-
Notifications
You must be signed in to change notification settings - Fork 274
feat(openapi): Add generator support for OpenAPI overlays specs #11467
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
base: main
Are you sure you want to change the base?
Conversation
🌱 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. |
| } | ||
|
|
||
| if (!Array.isArray(overlay.actions) || overlay.actions.length === 0) { | ||
| context.logger.error("Overlay file must have at least one action"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a warning, it shouldn't fail anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Practically speaking I agree. This was meant to enforce a rule in the Overlays spec:
REQUIRED An ordered list of actions to be applied to the target document. The array MUST contain at least one value.
|
A couple of comments:
I asked Claude to review the PR, and it had some helpful feedback, but nothing worth holding the PR back on. I recommend asking it to review and doing some polishing based on that. |
Description
Linear ticket: Refs https://linear.app/buildwithfern/issue/FER-8144/add-openapi-overlays-support
Changes Made
(note: merging to a feature branch, needs more work to be feature complete)
See the announcement and spec for context.
I copied the test fixture for applying overrides, so it's not exhaustive.
Open Questions / Issues
The test fixture for overlays was based on the overrides fixture next to it. However, when generated, the snapshot has one reference to

UserSettingswhich ends up typed asunknownin the overlays code path. At first glance I'm not sure what's causing this, but wonder if it's something to with refs not getting copied over correctly.Do we need to add this support to https://github.com/fern-api/fern/blob/066edd00e9d74464fd150839fb539c716efd6d66/packages/cli/workspace/browser-compatible-fern-workspace/src/InMemoryOpenAPILoader.ts as well?
Testing
Unit and snapshot tests cover this change for now. I haven't manually tested it, would do that as part of merging the feature branch.
TODO / Follow-ons