Skip to content

Generate path paramaters optimistically for flaky schemas #2103

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

Closed
1 task done
ViktorPontinen opened this issue Jan 17, 2025 · 1 comment
Closed
1 task done

Generate path paramaters optimistically for flaky schemas #2103

ViktorPontinen opened this issue Jan 17, 2025 · 1 comment
Labels
enhancement New feature or request openapi-ts Relevant to the openapi-typescript library

Comments

@ViktorPontinen
Copy link
Contributor

Description

We have cases where our automatically generated OpenAPI schemas are missing proper path parameter definitions. It would be useful to have an escape hatch for these kind of flaky schemas. Where resolving the issue at the root might not be feasable or resource intensive.

Proposal

My suggestion is to allow an escape hatch for these kind of flaky schemas, using an option --generate-path-params that can be passed to the CLI. This option would enable the library to automatically extract path param keys from the url and add them to the generated paths.
This should not break anything else and not affect overall functionality, except for those that need it.

I understand this might be against the philosophy of this library. So please give feedback on if you think this is reasonable or not.

Extra

@ViktorPontinen ViktorPontinen added enhancement New feature or request openapi-ts Relevant to the openapi-typescript library labels Jan 17, 2025
@ViktorPontinen
Copy link
Contributor Author

PR for suggested changes: #2102

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