@egomobile/openapi-schema-validator
v0.2.1
Published
Additional and strict validation of OpenAPI documents in context of @egomobile/http-server.
Downloads
16
Readme
@egomobile/openapi-schema-validator
Additional and strict validation of OpenAPI documents in context of @egomobile/http-server.
Table of contents
Install [↑]
Execute the following command from your project folder, where your package.json
file is stored:
npm install --save @egomobile/openapi-schema-validator
Usage [↑]
Quick example [↑]
import createServer from "@egomobile/http-server";
import { validateSwaggerDocument } from "@egomobile/openapi-schema-validator";
const app = createServer();
const result = app.controllers();
// validate document schema
// and documents of controller methods
await validateSwaggerDocument({
controllerMethods: result.methods,
documentation: result.documentation,
});
await app.listen(8080);
Credits [↑]
The module makes use of:
Documentation [↑]
The API documentation can be found here.