Skip to content

Commit

Permalink
fix reference labels in schema2Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
maoo committed Apr 11, 2024
1 parent a956cec commit 5b91507
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion schema2Markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ function renderRef(contextRef) {
objectRef = "../../" + objectType + "/schemas/" + objectName;
}

return `**Reference**: [${objectType}/${objectName}](${objectRef})\n\n`;
let refLabel = `${objectType}/${objectName}`;
if (objectType == objectName) {
refLabel = objectName;
}
return `**Reference**: [${refLabel}](${objectRef})\n\n`;
}

function hasAllOf(allOfArray) {
Expand Down

0 comments on commit 5b91507

Please sign in to comment.