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 committed Nov 22, 2023
1 parent 21cdafd commit ea10b18
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 ea10b18

Please sign in to comment.