Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Additional and strict validation of OpenAPI documents in context of @egomobile/http-server.

License

Notifications You must be signed in to change notification settings

egomobile/node-openapi-schema-validator

Repository files navigation

npm PRs Welcome

@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.