# swagger-endpoint-validator

> A validator of API endpoints to check that input and output match with the swagger specification for the API

Latest version **4.1.0** (published 2023-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install swagger-endpoint-validator
pnpm add swagger-endpoint-validator
yarn add swagger-endpoint-validator
bun add swagger-endpoint-validator
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2023-06-09 |
| First published | 2019-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 7 |
| Unpacked size | 66.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Maintainers | feliun, josegrobles, kevinccbsg, ulisesgascon, guidesmiths_bot |
| Keywords | swagger, enpoint, validator |

## Links

- npm: https://www.npmjs.com/package/swagger-endpoint-validator
- Repository: https://github.com/guidesmiths/swagger-endpoint-validator
- Homepage: https://github.com/guidesmiths/swagger-endpoint-validator#readme
- Issues: https://github.com/guidesmiths/swagger-endpoint-validator/issues
- npm.io page: https://npm.io/package/swagger-endpoint-validator

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ^4.3.4
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [swagger-jsdoc](https://npm.io/package/swagger-jsdoc.md) ^6.2.8
- [openapi-enforcer](https://npm.io/package/openapi-enforcer.md) ^1.22.2
- [swagger-ui-express](https://npm.io/package/swagger-ui-express.md) ^4.6.2
- [express-jsdoc-swagger](https://npm.io/package/express-jsdoc-swagger.md) ^1.8.0
- [express-openapi-validator](https://npm.io/package/express-openapi-validator.md) ^5.0.3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 4.1.0 (latest) — 2023-06-09
- 4.0.0 — 2023-03-30
- 3.0.2 — 2022-05-03
- 3.0.1 — 2022-03-07
- 2.1.0 — 2020-07-24
- 2.0.2 — 2020-05-06
- 2.0.1 — 2020-04-13
- 2.0.0 — 2020-04-13
- 1.1.5 — 2020-03-24
- 1.1.4 — 2020-03-23
- 1.1.3 — 2020-01-28
- 1.1.2 — 2020-01-22
- 1.1.1 — 2020-01-16
- 1.1.0 — 2019-12-23
- 1.0.0 — 2019-10-28

## README

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![CI](https://github.com/guidesmiths/swagger-endpoint-validator/actions/workflows/ci.yml/badge.svg)](https://github.com/guidesmiths/swagger-endpoint-validator/actions/workflows/ci.yml)
[![CD](https://github.com/guidesmiths/swagger-endpoint-validator/actions/workflows/cd.yml/badge.svg)](https://github.com/guidesmiths/swagger-endpoint-validator/actions/workflows/cd.yml)

# swagger-endpoint-validator

![npm](https://img.shields.io/npm/v/swagger-endpoint-validator)

A validator of API endpoints to check that input and/or output match with the swagger specification for the API.

This is based on [express-swagger-generator](https://www.npmjs.com/package/express-swagger-generator), so it is important that each endpoints is properly documented so that the library can do the validation.

## Installation

```bash
npm install --save swagger-endpoint-validator
```

## Methods

### init(app: ExpressApp, options: ConfigFile)

```js
await validator.init(app, options);
```

where:

  - `app` is the Express app instance.
  - `options` is the configuration object used by the validator.

## TO DO!

Improve this doc.

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
  <tbody>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/kevinccbsg"><img src="https://avatars.githubusercontent.com/u/12685053?v=4?s=100" width="100px;" alt="Kevin Julián Martínez Escobar"/><br /><sub><b>Kevin Julián Martínez Escobar</b></sub></a><br /><a href="https://github.com/onebeyond/swagger-endpoint-validator/issues?q=author%3Akevinccbsg" title="Bug reports">🐛</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=kevinccbsg" title="Code">💻</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=kevinccbsg" title="Documentation">📖</a> <a href="#ideas-kevinccbsg" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/pulls?q=is%3Apr+reviewed-by%3Akevinccbsg" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=kevinccbsg" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/LonelyPrincess"><img src="https://avatars.githubusercontent.com/u/17673317?v=4?s=100" width="100px;" alt="Sara Hernández"/><br /><sub><b>Sara Hernández</b></sub></a><br /><a href="https://github.com/onebeyond/swagger-endpoint-validator/issues?q=author%3ALonelyPrincess" title="Bug reports">🐛</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=LonelyPrincess" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/irenemateoh-fullstack/"><img src="https://avatars.githubusercontent.com/u/39806058?v=4?s=100" width="100px;" alt="Irene Mateo Herrero"/><br /><sub><b>Irene Mateo Herrero</b></sub></a><br /><a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=irenemherrero" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/inigomarquinez"><img src="https://avatars.githubusercontent.com/u/25435858?v=4?s=100" width="100px;" alt="Íñigo Marquínez Prado"/><br /><sub><b>Íñigo Marquínez Prado</b></sub></a><br /><a href="https://github.com/onebeyond/swagger-endpoint-validator/issues?q=author%3Ainigomarquinez" title="Bug reports">🐛</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=inigomarquinez" title="Code">💻</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=inigomarquinez" title="Documentation">📖</a> <a href="#ideas-inigomarquinez" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-inigomarquinez" title="Maintenance">🚧</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/pulls?q=is%3Apr+reviewed-by%3Ainigomarquinez" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=inigomarquinez" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://ulisesgascon.com/"><img src="https://avatars.githubusercontent.com/u/5110813?v=4?s=100" width="100px;" alt="Ulises Gascón"/><br /><sub><b>Ulises Gascón</b></sub></a><br /><a href="https://github.com/onebeyond/swagger-endpoint-validator/issues?q=author%3AUlisesGascon" title="Bug reports">🐛</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=UlisesGascon" title="Code">💻</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=UlisesGascon" title="Documentation">📖</a> <a href="#ideas-UlisesGascon" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-UlisesGascon" title="Maintenance">🚧</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/pulls?q=is%3Apr+reviewed-by%3AUlisesGascon" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=UlisesGascon" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/neodmy"><img src="https://avatars.githubusercontent.com/u/36865163?v=4?s=100" width="100px;" alt="David Miguel Yusta"/><br /><sub><b>David Miguel Yusta</b></sub></a><br /><a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=neodmy" title="Code">💻</a> <a href="https://github.com/onebeyond/swagger-endpoint-validator/commits?author=neodmy" title="Tests">⚠️</a></td>
    </tr>
  </tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

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