9904 Fix double quoting default values in Kotlin Spring#11627
9904 Fix double quoting default values in Kotlin Spring#11627wing328 merged 1 commit intoOpenAPITools:masterfrom bamapookie:9904_fix_double_quoting_default_values
Conversation
|
I'm unsure what to do here. There are tests failing for go and jaxrs, but I don't know why. I added a new endpoint to openapi-generator/src/test/resources/2_0/petstore.yaml, because that is the file that generated the samples, but the documentation in CONTRIBUTING.md says to update openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml. Which one should I update? |
|
For the Go related error in CircleCI node 2, please ignore that for the time being. |
|
Rebased on current upstream master. |
|
cc @jimschubert (2017/09) ❤️, @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) |
|
Tested locally to confirm the fix. Thanks for the PR. I'll try to add some tests later to cover this. |
Fix for #9904.
Kotlin files with default values that are not enums were getting double quoted (
defaultValue = ""default"") in API file generation. This fixes the issue for query parameters.The first commit adds a method to the petstore sample that uses the code path demonstrating this bug. See the second commit for the invalid source generated. (kotlin-springboot)
CC: Kotlin committee members @jimschubert, @dr4ke616, @karismann, @Zomzog, @andrewemery, @4brunu, and @yutaka0m
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(5.3.0),6.0.xFix should go into 5.4.0 branch as well.