We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dab636d commit 65fffcbCopy full SHA for 65fffcb
templates-v7/libraries/jersey3/oneof_model.mustache
@@ -120,7 +120,10 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
120
{{/isPrimitiveType}}
121
if (attemptParsing) {
122
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
123
- boolean typeMatch = Arrays.stream({{{dataType}}}.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
+ boolean typeMatch = false;
124
+ if(tree.findValue("type") != null) {
125
+ typeMatch = Arrays.stream({{{dataType}}}.TypeEnum.values()).anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
126
+ }
127
128
if(typeMatch) {
129
{{#isMap}}
0 commit comments