Skip to content

Commit

Permalink
feat(openapi): schema validation for write api definitions file
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Oct 9, 2020
1 parent 414fe19 commit 87e3f26
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/api.js
Expand Up @@ -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);
});

0 comments on commit 87e3f26

Please sign in to comment.