-
-
Notifications
You must be signed in to change notification settings - Fork 528
fix: support nested path parameters in --path-params-as-types #1130
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
🦋 Changeset detectedLatest commit: ed0ab47 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Great tests, and great code, thank you!
* Add changesets CI action * Update changeset for #1130 * Speed up monorepo build * Disable npm token for debugging * Update examples
This change made majority of |
However, if you have even one parameter that is required, then If you need to access that |
Not sure if I'm in favour of this approach, but thanks for clarifying it. |
* Add changesets CI action * Update changeset for openapi-ts#1130 * Speed up monorepo build * Disable npm token for debugging * Update examples
Changes
The existing code for
--path-params-as-types
assumes path parameters are defined on the PathItemObject:But its valid to define them on the OperationObject:
FastAPI does it this way.
How to Review
This is both my first openapi-typescript PR and my first typescript PR. Don't hold back.
Checklist
examples/
directory updated (only applicable for openapi-typescript)