Skip to content

dougmoscrop/get-openapi-paths

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Infer an OpenAPI paths-like object from various web frameworks

Resources

Stars

Watchers

Forks

Packages

No packages published