-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Generate and use enum types in parameters for typescript-axios #13438
Conversation
up |
@amakhrov I see, any suggestions to fix that, or should I just merge to 7.0.x? |
I think targeting this for the 7.x branch is reasonable |
d224fe6
to
98f7935
Compare
@amakhrov I switched to merge to 7.0.x. |
@amakhrov can I get your review/approval? I'm not sure what the failing bitrise test is, could use some help with that too please. |
modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
Outdated
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
Show resolved
Hide resolved
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.
Looks good to me, thanks for your contribution!
Thanks for the review. Is there anything else I need to do to get this merged? Need someone with write access to do it please. |
One of the tests failed in CI. |
I updated the PR with the fix. Can't directly merge because the fix isn't on the |
Bumping this for merging please @amakhrov. |
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors. Let me know if you need help fixing it. |
Is there a reason why
We have a nullable enum field in our API field:
type: string
nullable: true
enum: &a5
- foo
- bar
- baz but generator generates code with non-nullable type : |
Resolves #13439
Changes enum implementation for operators in the typescript-axios generator to more closely follow the fetch generator - generating actual types for enums defined in operators rather than using union (
|
) syntax.This should be a non-breaking change since the effective types are the same, but please correct me if i'm wrong.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(6.1.0) (minor release - breaking changes with fallbacks),7.0.x
(breaking changes without fallbacks)@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04)