mznotes/spec/generate.js

15 lines
354 B
JavaScript
Raw Normal View History

2023-03-28 02:34:46 +00:00
const JsonSchemaStaticDocs = require("json-schema-static-docs");
(async () => {
let jsonSchemaStaticDocs = new JsonSchemaStaticDocs({
inputPath: "./spec",
outputPath: "./docs/src/generated/spec",
ajvOptions: {
allowUnionTypes: true,
},
});
await jsonSchemaStaticDocs.generate();
console.log("Documents generated.");
})();