-
-
Notifications
You must be signed in to change notification settings - Fork 507
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
feat: brings back --make-paths-enum option to generate ApiPaths enum #2052
Conversation
🦋 Changeset detectedLatest commit: e4ce821 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
d40d6ec
to
9e125a9
Compare
@drwpow it seems you have some more context on this. I suspect the discussion in the issue went missing because it was closed. |
Sorry I think this was just an accidental omission for 7.x, but since it’s an opt-in feature flag I support adding it! (I’ll only try to ensure that default behavior doesn’t change). I’m in favor of this merging, but we’ll need to add a few tests just to ensure this feature doesn’t break. Also please add a |
@drwpow Sounds good! |
👷 Deploy request for openapi-ts pending review.Visit the deploys page to approve it
|
e4ce821
to
4affc3c
Compare
@drwpow I have added a few tests and a minor changeset. |
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.
This is great, thank you! All tests pass and current behavior doesn’t change when the flag isn’t enabled. Will get this merged and shipped!
|
||
Enabling `--make-paths-enum` will add an `ApiPaths` enum like this to the generated types: | ||
|
||
::: code-group |
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 docs, thank you!
}, | ||
], | ||
[ | ||
"basic with path parameter", |
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! 🎉
Changes
Brings back
--make-paths-enum
option to generateApiPaths
enum.See: #1057
Checklist
docs/
updated (if necessary)pnpm run update:examples
run (only applicable for openapi-typescript)