Commit 125af40
feat(openapi): add webhook response descriptions to IR (#11222)
* feat(openapi): add webhook response descriptions to IR
This PR adds support for webhook response descriptions by:
1. Adding response field to OpenAPI IR Webhook type
2. Adding response/response-stream fields to Fern definition webhook schema
3. Converting OpenAPI webhook responses to Fern definition format
4. Converting Fern definition webhook responses to IR format
The descriptions are stored in the body-level docs fields (JsonResponse, FileDownloadResponse, etc.) rather than adding a response-level docs field to HttpResponse, which avoids widespread changes to endpoint handling.
Co-Authored-By: Sarah Bawabe <[email protected]>
* fix: add response and response-stream fields to webhook validator visitor
Co-Authored-By: Sarah Bawabe <[email protected]>
* chore: regenerate JSON schema files with webhook response fields
Co-Authored-By: Sarah Bawabe <[email protected]>
* feat(ir): add docs field to HttpResponse for webhook response descriptions
- Add extends: commons.WithDocs to HttpResponse in IR schema
- Regenerate IR SDK types for ir-types-latest
- Update convertWebhookGroup.ts to populate docs field on webhook responses
- Update convertHttpResponse.ts to include docs field on endpoint responses
- Update openapi-to-ir WebhookConverter.ts to capture response descriptions
- Update openapi-to-ir OperationConverter.ts to include docs field
- Update openrpc-to-ir MethodConverter.ts to include docs field
- Update test snapshots with new docs field
Co-Authored-By: Sarah Bawabe <[email protected]>
* fix: add docs field to protoc-gen-fern MethodConverter HttpResponse
Co-Authored-By: Sarah Bawabe <[email protected]>
* test: update ete-tests snapshots for HttpResponse docs field
Co-Authored-By: Sarah Bawabe <[email protected]>
* feat(ir): bump IR version to 62.5.0 and update snapshots for HttpResponse docs field
Co-Authored-By: Sarah Bawabe <[email protected]>
* test: update protoc-gen-fern snapshot for HttpResponse docs field
Co-Authored-By: Sarah Bawabe <[email protected]>
* test: update grpc-comments-ir snapshot for HttpResponse docs field
Co-Authored-By: Sarah Bawabe <[email protected]>
* test: update webhook-openapi-responses-fdr snapshot with response descriptions
Co-Authored-By: Sarah Bawabe <[email protected]>
* fix(fdr): propagate response-level docs to FDR description field
Co-Authored-By: Sarah Bawabe <[email protected]>
* fix: remove trailing newlines from snapshot files
Co-Authored-By: Sarah Bawabe <[email protected]>
* test: update v61-to-v60 migration snapshot for HttpResponse docs field
Co-Authored-By: Sarah Bawabe <[email protected]>
* test: regenerate ir-generator-tests JSON fixtures for HttpResponse docs field
Co-Authored-By: Sarah Bawabe <[email protected]>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent b1ceca2 commit 125af40
File tree
360 files changed
+2215
-901
lines changed- fern/apis/fern-definition/definition
- packages
- cli
- api-importers
- openapi-to-ir/src/3.1/paths/operations
- openapi
- openapi-ir-parser/src/openapi/v3/converters/operation
- openapi-ir-to-fern/src
- openapi-ir
- fern/definition
- src/sdk
- api/resources
- finalIr/types
- parseIr/types
- serialization/resources
- finalIr/types
- parseIr/types
- openrpc-to-ir/src/1.x/methods
- v3-importer-tests/src/__test__/__snapshots__
- baseline-sdks
- v3-sdks
- cli
- ete-tests/src/tests
- dependencies/__snapshots__
- ir/__snapshots__
- protoc-gen-fern/__snapshots__
- fern-definition
- schema/src/schemas
- api/resources
- auth/types
- commons/types
- file/types
- types/types
- webhooks/types
- websocket/types
- serialization/resources
- file/types
- webhooks/types
- validator/src/ast/visitors
- generation
- ir-generator-tests/src/ir/__test__
- irs
- test-definitions-openapi
- test-definitions
- ir-generator/src/converters
- services
- ir-migrations/src/migrations/v61-to-v60/__test__/__snapshots__
- protoc-gen-fern/src/converters/service
- register/src/ir-to-fdr-converter
- __test__/__snapshots__
- workspace/lazy-fern-workspace/src
- ir-sdk
- fern/apis/ir-types-latest
- definition
- src/sdk
- api/resources/http/types
- serialization/resources/http/types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
360 files changed
+2215
-901
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3224 | 3224 | | |
3225 | 3225 | | |
3226 | 3226 | | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
3227 | 3247 | | |
3228 | 3248 | | |
3229 | 3249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3244 | 3244 | | |
3245 | 3245 | | |
3246 | 3246 | | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
3247 | 3267 | | |
3248 | 3268 | | |
3249 | 3269 | | |
| |||
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
| 271 | + | |
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| |||
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
359 | | - | |
| 360 | + | |
| 361 | + | |
360 | 362 | | |
361 | 363 | | |
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
365 | | - | |
| 367 | + | |
| 368 | + | |
366 | 369 | | |
367 | 370 | | |
368 | 371 | | |
| |||
371 | 374 | | |
372 | 375 | | |
373 | 376 | | |
374 | | - | |
| 377 | + | |
| 378 | + | |
375 | 379 | | |
376 | 380 | | |
377 | 381 | | |
| |||
436 | 440 | | |
437 | 441 | | |
438 | 442 | | |
439 | | - | |
| 443 | + | |
| 444 | + | |
440 | 445 | | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
444 | | - | |
| 449 | + | |
| 450 | + | |
445 | 451 | | |
446 | 452 | | |
447 | 453 | | |
448 | 454 | | |
449 | 455 | | |
450 | | - | |
| 456 | + | |
| 457 | + | |
451 | 458 | | |
452 | 459 | | |
453 | 460 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
| 146 | + | |
| 147 | + | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
42 | 56 | | |
43 | 57 | | |
44 | 58 | | |
| |||
79 | 93 | | |
80 | 94 | | |
81 | 95 | | |
| 96 | + | |
82 | 97 | | |
83 | 98 | | |
84 | 99 | | |
| |||
Lines changed: 81 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
56 | 137 | | |
57 | 138 | | |
58 | 139 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
0 commit comments