clean up the logic keeping behavior.
@@ -665,21 +665,17 @@ public final class ExternalRefProcessor {
return newRef;
}
-
private void processRefSchema(Schema subRef, String externalFile) {
RefFormat format = computeRefFormat(subRef.get$ref());
- if (isAnExternalRefFormat(format)) {
- String $ref = constructRef(subRef, externalFile);
- subRef.set$ref($ref);
- if($ref.startsWith("."))
- processRefToExternalSchema($ref, RefFormat.RELATIVE);
- else {
- processRefToExternalSchema($ref, RefFormat.URL);
- }
- } else {
+ if (!isAnExternalRefFormat(format)) {
processRefToExternalSchema(externalFile + subRef.get$ref(), RefFormat.RELATIVE);
+ return;
}
+ String $ref = constructRef(subRef, externalFile);
+ subRef.set$ref($ref);
+
+ processRefToExternalSchema($ref, computeRefFormat(subRef.get$ref()));
}
