Skip to content

Commit

Permalink
Update ExternalRefProcessor.java
Browse files Browse the repository at this point in the history
Fix Duplicated objects
  • Loading branch information
Emad89 authored Nov 13, 2023
1 parent c690d8d commit cddcc11
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ private String finalNameRec(Map<String, Schema> schemas, String possiblyConflict
return tryName;
}

private String normalizeRelativeRef(String $ref, RefFormat refFormat) {
if (refFormat == RefFormat.RELATIVE && !$ref.startsWith("./")) {
return "./" + $ref;
}
return $ref;
}
public String processRefToExternalSchema(String $ref, RefFormat refFormat) {
$ref = normalizeRelativeRef($ref, refFormat);
String renamedRef = cache.getRenamedRef($ref);
if(renamedRef != null) {
return renamedRef;
Expand Down

0 comments on commit cddcc11

Please sign in to comment.