get-openapi-paths

2.0.1 • Public • Published

get-openapi-paths

This library tries to return paths from various frameworks for inclusion in an auto-generated OpenAPI specification

Supports:

  • koa-router
  • koa/router
  • express
  • connect (routes only, no methods)
  • fastify

Does not support:

  • koa-route

Sample output

const getPaths = require('get-openapi-paths');
const express = require('express');

const app = express();

app.get('/foo', ...);

const paths = getPaths(app);

/*
paths is:
{
    '/foo': {
        get: {}
    }
}
*/

Prior Art

Readme

Keywords

none

Package Sidebar

Install

npm i get-openapi-paths

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

11.9 kB

Total Files

7

Last publish

Collaborators

  • dougmoscrop