Skip to content

Commit

Permalink
Merge branch '6.2.x' into 7.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Jul 8, 2023
2 parents a73e371 + 0d277c5 commit ba05131
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ public String name() {
return getString("title");
}

public boolean has(String key) {
return jsonNode.has(key);
}

public String getString(String key) {
return jsonNode.has(key) ? jsonNode.get(key).asText() : null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected Object deserialize(
: objectMapper.readValue(buffer.array(), start, length, type);
} else {
String typeName;
if (schema.rawSchema() instanceof CombinedSchema) {
if (schema.has("oneOf") || schema.has("anyOf") || schema.has("allOf")) {
if (jsonNode == null) {
jsonNode = objectMapper.readValue(buffer.array(), start, length, JsonNode.class);
}
Expand Down

0 comments on commit ba05131

Please sign in to comment.