2.0.1 • Published 3 years ago

get-openapi-paths v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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

2.0.1

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.1.0

4 years ago

1.0.0

4 years ago