feat(openapi): schema validation for write api definitions file

This commit is contained in:
Julian Lam
2020-10-09 16:38:37 -04:00
parent 414fe19c6e
commit 87e3f26fe4

View File

@@ -235,6 +235,18 @@ describe('Read API', async () => {
});
});
describe('Write API', () => {
describe('Write API', async () => {
let writeApi;
const apiPath = path.resolve(__dirname, '../public/openapi/write.yaml');
it('should pass OpenAPI v3 validation', async () => {
try {
await SwaggerParser.validate(apiPath);
} catch (e) {
assert.ifError(e);
}
});
// writeApi = await SwaggerParser.dereference(apiPath);
// console.log(writeApi);
});