Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/networknt/schema/AllOfValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public AllOfValidator(String schemaPath, JsonNode schemaNode, JsonSchema parentS
int size = schemaNode.size();
for (int i = 0; i < size; i++) {
schemas.add(new JsonSchema(validationContext,
getValidatorType().getValue(),
parentSchema.getSchemaPath() + "/" + getValidatorType().getValue(),
parentSchema.getCurrentUri(),
schemaNode.get(i),
parentSchema));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/networknt/schema/AnyOfValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public AnyOfValidator(String schemaPath, JsonNode schemaNode, JsonSchema parentS
int size = schemaNode.size();
for (int i = 0; i < size; i++) {
schemas.add(new JsonSchema(validationContext,
getValidatorType().getValue(),
parentSchema.getSchemaPath() + "/" + getValidatorType().getValue(),
parentSchema.getCurrentUri(),
schemaNode.get(i),
parentSchema));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/networknt/schema/BaseJsonValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected void preloadJsonSchemas(final Collection<JsonSchema> schemas) {
}

protected boolean isPartOfOneOfMultipleType() {
return parentSchema.schemaPath.equals(ValidatorTypeCode.ONE_OF.getValue());
return parentSchema.schemaPath.endsWith(ValidatorTypeCode.ONE_OF.getValue());
}

/* ********************** START OF OpenAPI 3.0.x DISCRIMINATOR METHODS ********************************* */
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/networknt/schema/OneOfValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public OneOfValidator(String schemaPath, JsonNode schemaNode, JsonSchema parentS
int size = schemaNode.size();
for (int i = 0; i < size; i++) {
JsonNode childNode = schemaNode.get(i);
JsonSchema childSchema = new JsonSchema(validationContext, getValidatorType().getValue(), parentSchema.getCurrentUri(), childNode, parentSchema);
JsonSchema childSchema = new JsonSchema(validationContext, parentSchema.getSchemaPath() + "/" + getValidatorType().getValue(), parentSchema.getCurrentUri(), childNode, parentSchema);
schemas.add(new ShortcutValidator(childNode, parentSchema, validationContext, childSchema));
}
parseErrorCode(getValidatorType().getErrorCodeKey());
Expand Down