Closed fzn0x closed 2 years ago
const widdershins = require('widdershins');
const fs = require('fs');
const options = {
language_tabs: [{ python: "Python" }, { ruby: "Ruby" }]
};
const fileData = fs.readFileSync('swagger.json', 'utf8');
const swaggerFile = JSON.parse(fileData);
widdershins.convert(swaggerFile, options)
.then(markdownOutput => {
// markdownOutput contains the converted markdown
fs.writeFileSync('myOutput.md', markdownOutput, 'utf8');
})
.catch(err => {
// handle errors
});
After research, yes we can do that! Nice library!
Is widdershins provide any programmable API or is it just CLI based?