Swagger middleware
Middleware for serving your swagger spec and/or swagger-ui documentation based on the spec.
Options
Option | Type | Default | Description |
---|---|---|---|
spec | string | Object |
Swagger spec. If string, one of the following: yaml spec, json spec, absolute path of spec on disk | |
mountSpec | string | boolean |
/spec |
Sub-path to mount the spec to. Get requests to this path will return the spec. Set to false to disable behaviour. |
mountDocs | string | boolean |
/docs |
Sub-path to mount the swagger-ui documentation to. Get requests to this path will return the documentation. Set to false to disable behaviour. |