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
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ private CompletionStage<JsonValue> resolveRefs(final JsonObject objectWithTmRef,
.orElseGet(() -> CompletableFuture.completedFuture(null))
, executor
)
.thenCompose(refObject -> {
if (refObject.contains(TM_REF)) {
return resolveRefs(refObject, dittoHeaders) // recurse!
.thenApply(JsonValue::asObject);
} else {
return potentiallyResolveRefs(refObject, dittoHeaders); // recurse!
}
})
.thenApply(refObject ->
JsonFactory.mergeJsonValues(objectWithTmRef.remove(TM_REF), refObject).asObject()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ static SecurityScheme fromJson(final CharSequence securitySchemeName, final Json
return AdditionalSecurityScheme.fromJson(schemeName, jsonObject);
}
})
.orElseThrow(() -> new IllegalArgumentException("Could not create SingleDataSchema"));
.orElseThrow(() -> new IllegalArgumentException("Could not create SecurityScheme - " +
"json field <" + SecuritySchemeJsonFields.SCHEME.getPointer() + "> was missing or unknown"));
}

static NoSecurityScheme.Builder newNoSecurityBuilder(final CharSequence securitySchemeName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ static SingleDataSchema fromJson(final JsonObject jsonObject) {
throw new IllegalArgumentException("Unsupported dataSchema-type: " + type);
}
})
.orElseThrow(() -> new IllegalArgumentException("Could not create SingleDataSchema"));
.orElseThrow(() -> new IllegalArgumentException("Could not create SingleDataSchema - " +
"json field <" + DataSchemaJsonFields.TYPE.getPointer() + "> was missing or unknown"));
}

static BooleanSchema.Builder newBooleanSchemaBuilder() {
Expand Down