Fix for [BUG] jaxrs-spec [server] oneOf, anyOf Polymorphism does not work #6253
Open
tuxBurner wants to merge 9 commits intoOpenAPITools:masterfrom
Open
Fix for [BUG] jaxrs-spec [server] oneOf, anyOf Polymorphism does not work #6253tuxBurner wants to merge 9 commits intoOpenAPITools:masterfrom
tuxBurner wants to merge 9 commits intoOpenAPITools:masterfrom
Conversation
jeff9finger
reviewed
May 11, 2020
...erator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java
Outdated
Show resolved
Hide resolved
jeff9finger
reviewed
May 11, 2020
modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
Outdated
Show resolved
Hide resolved
Author
|
@jeff9finger Did some changes and merged master |
Author
|
Okay @jeff9finger all checks are green now :) |
jeff9finger
reviewed
May 15, 2020
jeff9finger
left a comment
There was a problem hiding this comment.
Were the changes to this file necessary? Looks like it was only adding a space and empty lines.
jeff9finger
approved these changes
May 15, 2020
jeff9finger
left a comment
There was a problem hiding this comment.
My comments were addressed and this looks good to me. Does anyone else care to review?
ruedigerk
reviewed
Jul 18, 2020
Comment on lines
+1086
to
+1088
| List<Object> models = (List<Object>) objs.get("models"); | ||
| for (Object _mo : models) { | ||
| Map<String, Object> mo = (Map<String, Object>) _mo; |
Contributor
There was a problem hiding this comment.
Why are you casting twice instead of only once:
Suggested change
| List<Object> models = (List<Object>) objs.get("models"); | |
| for (Object _mo : models) { | |
| Map<String, Object> mo = (Map<String, Object>) _mo; | |
| List<Map<String, Object>> models = (List<Map<String, Object>>) objs.get("models"); | |
| for (Map<String, Object> mo : models) { |
|
What is the current state of this? Any updates? I would like to continue the work if no one else does. |
Author
|
@R1tschY it hast to be updated to the current 5.0.0 branch i use the code already in production and it works but currently it is outdated. |
6 tasks
|
@tuxBurner any plans to still land this in? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For the issue #5565 this is a fix in the current master 5.0.0-SNAPSHOT
With this it is possible to generate onOf interfaces and there related pojos in the jaxrs-spec codegen module
@bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @bkabrda (2020/01)
PR checklist
./bin/(or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).master,4.3.x,5.0.x. Default:master.