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 f4a80aa commit fe2e40e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions schema2Markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ const fse = require('fs-extra');
const yaml = require('js-yaml');
const path = require('path');

function processProperty(propertyName, propertyDetails, schemaExamples) {
function processProperty(propertyName, propertyDetails, schemaExamples, required) {
let markdownContent = '';

if (propertyName === 'type') {
markdownContent += `### Type\n\n`;
markdownContent += `\`${propertyDetails.const}\`\n\n`;
return markdownContent;
}
markdownContent += `### ${propertyDetails.title || propertyName}\n\n`;
markdownContent += `\`${propertyName}\`\n\n`;
markdownContent += `### ${\`${propertyName}\`}\n\n`;
if (required) { markdownContent += `**(required)**\n`; }

if (propertyDetails.description != null) {
markdownContent += `${escape(propertyDetails.description)}\n\n`;
Expand Down

0 comments on commit fe2e40e

Please sign in to comment.