UNPKG

swagger-routes-express

Version:

Connect Express route controllers to restful paths using a Swagger 2 or OpenAPI 3 definition file

9 lines (6 loc) 261 B
const summarisePaths = require('./summarisePaths') const summariseApi = ({ basePath, info: { description, title: name, version }, paths }) => ({ info: { name, description, version }, paths: summarisePaths(paths, basePath) }) module.exports = summariseApi