Skip to content

Commit

Permalink
Update schema2Markdown.js
Browse files Browse the repository at this point in the history
Co-authored-by: Kris West <kris.west@interop.io>
  • Loading branch information
TheJuanAndOnly99 and kriswest authored Apr 11, 2024
1 parent 816c3a8 commit a2b12f7
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions schema2Markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,9 @@ function generateObjectMD(schema, title, schemaFolderName, filePath, version) {
markdownContent += `## Properties\n\n`;

for (const [propertyName, propertyDetails] of Object.entries(properties)) {
markdownContent += processProperty(propertyName, propertyDetails, schema.examples);
markdownContent += processProperty(propertyName, propertyDetails, schema.examples, required.includes(propertyName));
}

// show required properties
if (required && required.length > 0) {
markdownContent += `### Required Properties:\n\n`;
// for each required property show the name
required.forEach((propertyName) => {
markdownContent += `* \`${propertyName}\`\n`;
});
markdownContent += '\n';
}

if (ref) {
markdownContent += `ref: ${ref}\n\n`;
Expand Down

0 comments on commit a2b12f7

Please sign in to comment.