# @egomobile/openapi-schema-validator

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

Latest version **0.2.1** (published 2023-12-11) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @egomobile/openapi-schema-validator
pnpm add @egomobile/openapi-schema-validator
yarn add @egomobile/openapi-schema-validator
bun add @egomobile/openapi-schema-validator
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2023-12-11 |
| First published | 2022-12-27 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18.0.0 |
| Dependencies | 2 |
| Unpacked size | 34.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Next.e.GO Mobile SE, Aachen, Germany |
| Maintainers | ekmobile, egodux, mkloubertego, mkloubert, ekegodigital |
| Keywords | openapi, swagger, api, documentation, rest, query, parameter, body, header, json schema, validator, validation, http server, rest, api, ego |

## Links

- npm: https://www.npmjs.com/package/@egomobile/openapi-schema-validator
- Repository: https://github.com/egomobile/node-openapi-schema-validator
- Homepage: https://github.com/egomobile/node-openapi-schema-validator#readme
- Issues: https://github.com/egomobile/node-openapi-schema-validator/issues
- npm.io page: https://npm.io/package/@egomobile/openapi-schema-validator

## Dependencies (2)

- [openapi-types](https://npm.io/package/openapi-types.md) 12.1.3
- [openapi-schema-validator](https://npm.io/package/openapi-schema-validator.md) 12.1.3

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2023-12-11
- 0.2.0 — 2023-12-11
- 0.1.1 — 2023-01-02
- 0.1.0 — 2022-12-27

## README

[![npm](https://img.shields.io/npm/v/@egomobile/openapi-schema-validator.svg)](https://www.npmjs.com/package/@egomobile/openapi-schema-validator)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/egomobile/openapi-schema-validator/pulls)

# @egomobile/openapi-schema-validator

> Additional and strict validation of OpenAPI documents in context of [@egomobile/http-server](https://github.com/egomobile/node-http-server).

<a name="toc"></a>

## Table of contents

- [Install](#install)
- [Usage](#usage)
- [Credits](#credits)
- [Documentation](#documentation)
- [See also](#see-also)

<a name="install"></a>

## Install [<a href="#toc">↑</a>]

Execute the following command from your project folder, where your `package.json` file is stored:

```bash
npm install --save @egomobile/openapi-schema-validator
```

<a name="usage"></a>

## Usage [<a href="#toc">↑</a>]

<a name="quick-example"></a>

### Quick example [<a href="#usage">↑</a>]

```typescript
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);
```

<a name="credits"></a>

## Credits [<a href="#toc">↑</a>]

The module makes use of:

- [@open-api](https://github.com/kogosoftwarellc/open-api)

<a name="documentation"></a>

## Documentation [<a href="#toc">↑</a>]

The API documentation can be found
[here](https://egomobile.github.io/node-openapi-schema-validator/).

---
_Source: https://npm.io/package/@egomobile/openapi-schema-validator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
