3.0.2 ā€¢ Published 1 year ago

koa-oas-router v3.0.2

Weekly downloads
24
License
MIT
Repository
github
Last release
1 year ago

Welcome to koa-oas-router šŸ‘‹

Version Documentation Maintenance License: MIT semantic-release

This module extends the koa-router with some features usable with oas.

šŸ  Homepage

Features

  • Extends the normal koa-router.
  • Add routes on runtime from a oas-specification.
  • Validates the oas (opt-out possible).
  • Generates stubs for not implemented operations (opt-out possible).

Install

npm i koa-oas-router --save

Usage

Javascript

const KoaOasRouter = require('koa-oas-router');

const yamljs = require('yamljs');

const spec = yamljs.load('./oas.yaml');

const router = new KoaOasRouter.KoaOasRouter(opts);
router.addRoutesFromSpecification(spec);

Typescript

import { KoaOasRouter } from 'koa-oas-router';

import * as yamljs from 'yamljs';

const spec = yamljs.load('./oas.yaml');

const router = new KoaOasRouter(opts);
router.addRoutesFromSpecification(spec);

For more detailed information look at the API.

Docs

API

Run tests

npm run test

Author

šŸ‘¤ Matthias Hecht

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2019 Matthias Hecht.

This project is MIT licensed.

3.0.2

1 year ago

3.0.1

3 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.3.0

4 years ago

1.2.2

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago