Skip to content

Commit

Permalink
Merge branch '7.0.x' into 7.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Jul 8, 2023
2 parents 49f93a4 + ba05131 commit 41691a2
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 41691a2

Please sign in to comment.