-
Notifications
You must be signed in to change notification settings - Fork 271
fix(openapi): propagate webhook responses from OpenAPI to IR #11133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add responses field to IR Webhook type definition (webhooks.yml) - Add WebhookResponse type with statusCode and docs fields - Update WebhookConverter to process operation responses - Regenerate IR SDK types - Update test snapshots to include webhook responses (204, 400, 500) Co-Authored-By: Sarah Bawabe <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
🌱 Seed Test SelectorSelect languages to run seed tests for:
How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR. |
Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
packages/ir-sdk/fern/apis/ir-types-latest/definition/webhooks.yml
Outdated
Show resolved
Hide resolved
Per PR feedback, reuse the existing http.HttpResponse type instead of creating a new WebhookResponse type. This provides consistency with the existing HTTP response handling and supports wildcard status codes (e.g., 4XX, 5XX) via the isWildcardStatusCode field. Changes: - Updated webhooks.yml to use http.HttpResponse instead of WebhookResponse - Regenerated IR SDK types (removed WebhookResponse type) - Updated WebhookConverter to create HttpResponse objects with proper wildcard status code handling - Updated test snapshots to reflect new response structure Co-Authored-By: Sarah Bawabe <[email protected]>
Resolve merge conflict in versions.yml - bump webhook responses feature to 3.8.0 since main already has 3.7.0 for default-integer-format feature Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
Co-Authored-By: Sarah Bawabe <[email protected]>
… minor bump) Co-Authored-By: Sarah Bawabe <[email protected]>
…65317066-webhook-responses-fix
Fixes FER-8007 (pt3)
Description
Refs: Requested by Sarah Bawabe (@sbawabe)
Webhook responses defined in OpenAPI specs (e.g., 204, 400, 500 status codes) were not being captured in the IR. This PR adds support for extracting and storing webhook responses in the IR.
Link to Devin run: https://app.devin.ai/sessions/f101e52b58ab44b49d44dc2bc1fd5c81
Changes Made
responsesoptional field to IRWebhooktype definition (webhooks.yml)http.HttpResponsetype instead of creating a new type (per PR feedback)WebhookConverterto processoperation.responsesfrom OpenAPI specsisWildcardStatusCodefieldresponses: undefinedtoconvertWebhookGroup.tsfor Fern-defined webhooks (no response source available)v62-to-v61/migrateFromV62ToV61.tsto stripresponsesfield andheadersfrom errors for backward compatibilityversions.ymlfor version 3.9.0Updates Since Last Revision
v63-to-v62/migrateFromV63ToV62.tstov62-to-v61/migrateFromV62ToV61.tsv63-to-v62migration fileheadersfield from errors for v61 compatibilityfeattype changes, not patch)Testing
ir-generator,ir-migrations, andopenapi-to-ircompile successfully)Human Review Checklist
body: undefinedis acceptable for webhook responses (webhooks don't have response bodies like endpoints)isWildcardStatusCode: true)descriptionfrom OpenAPI is not captured sinceHttpResponsedoesn't have adocsfield - confirm this is acceptable