-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Support for discriminator.mapping #536
Conversation
CodegenDiscriminator.equals support for CodegenDiscriminator in templates simple test
removed modelInheritanceSupportInGson from JavaClientCodegen
Thank you a lot! Have you the possibility to update the
I will perform some tests locally, but on the first look, it looks very good to me. |
@jmini, ok |
fix for empty mapping update samples fix gson deserializer
update all java samples
update all java samples
@jmini, fixed bugs |
@jmini did you check the code? |
Yes I did, it looks good to me. I was wondering if the change can be added to the The replacement of Technically speaking, if people are extending the What do you think? Would |
@jmini also, did you notice I changed |
Follow up: I have created a small PR for the documentation of this feature: #587 |
I forgot to say: thank you a lot for this PR! |
The `mapping` property of the [Discriminator Object] is "An object to hold mappings between payload values and schema names or references." The subsequent examples in the spec have `mapping`s of both types. The `mapping` support introduced in OpenAPITools#536 only supports references. Update the code to support names (identified by lack of `/`) or references and change a test mapping to cover this case. [Discriminator Object]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#discriminatorObject Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
The `mapping` property of the [Discriminator Object] is "An object to hold mappings between payload values and schema names or references." The subsequent examples in the spec have `mapping`s of both types. The `mapping` support introduced in #536 only supports references. Update the code to support names (identified by lack of `/`) or references and change a test mapping to cover this case. [Discriminator Object]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#discriminatorObject Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
…commitlint-monorepo chore(deps): update commitlint monorepo (major)
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.1.x
,4.0.x
. Default:master
.Description of the PR
See #417
Basic support for discriminator.mapping and support for jackson generator for polymorphic types with custom mapping.