Skip to content
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

Option to only generate code for specific tags/operations #1922

Open
2 tasks
edonv opened this issue Sep 20, 2024 · 0 comments
Open
2 tasks

Option to only generate code for specific tags/operations #1922

edonv opened this issue Sep 20, 2024 · 0 comments
Labels
enhancement New feature or request openapi-ts Relevant to the openapi-typescript library

Comments

@edonv
Copy link

edonv commented Sep 20, 2024

Description

It would be extremely useful to be able to filter which operations are generated code-wise. The Swift OpenAPI Generator has this feature, allowing the OpenAPI document's contents to be filtered before code is generated. It has the following capabilities (examples of which can be found here), filtering by:

  • path key,
  • tags,
  • schemas
  • operation ID

The Swift OpenAPI Generator does this right, so I think this could just take notes from their implementation of this feature. Their proposal document for this feature is also extremely detailed in their reasoning for the feature and how they implemented it, and I feel that all the reasoning translates directly to this project.

Proposal

While I'm not sure where exactly in the code this filtering would occur (though probably just at the initial parsing of the YAML/JSON), I imagine the exact config per project could be specified in the Redocly config file, similar to the examples here.

I imagine this would be added as a new field in OpenAPITSOptions, or it'd be in the redocly field.

Checklist

  • I can come up with the Redocly config parameters.
  • I can look into the codebase and see if I can't figure out where the filtering would happen.
@edonv edonv added enhancement New feature or request openapi-ts Relevant to the openapi-typescript library labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openapi-ts Relevant to the openapi-typescript library
Projects
None yet
Development

No branches or pull requests

1 participant