-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[Java][Client] Support primitives and arrays in oneOf #13897
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
|
Hi team, Do you need additional checks on this ? If you can provide a snapshot I can validate also. |
|
@dinuta please bulid the JAR locally to help test this PR. then run you tests with |
|
Hi team, Made 1 test with the following config (to generate a client consumer): The classes seems fine, but there aren't the swagger annotations on the api classes as per 6.2.1 version: Example annotations: It might not be so relevant for the issue, but I'll try to generate for okhttp3 with gson also. Don't know when I'll finish. Any questions ? Thoughts? |
|
@karzang sorry for the delay. can you please PM me via Slack https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g to quickly walk through 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.
FYI @OpenAPITools/generator-core-team
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.
can you please merge the latest master into your branch if you've not yet done so?
this file shouldn't be generated in the latest master.
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.
i rebased on top of the master but the existing samples were not deleted when calling ./bin/generate-samples.sh
I removed some samples that were falsely generated. Please let me know if you find more files which should not be generated.
As described in #12556 it is not possible to use schemas with primitive types or schemas of array type since the java client generator does only support schemas of type 'object' in oneOf. This change supports the use of primitives and arrays in oneOf without the need to wrap them into objects.
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)@bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2022/09) @lwlee2608 (2019/10)
@cachescrubber (2022/02) @welshm (2022/02) @MelleD (2022/02) @atextor (2022/02) @manedev79 (2022/02) @javisst (2022/02) @borsch (2022/02) @banlevente (2022/02)