this package is getting a path for a yaml OpenAPI file, and returns an express router with five routs.
- the yaml file.
- the json file.
- swagger web page.
- redocly web page.
- visual 'menu page' with buttons for those three routes.
simply use npm i add-doc-route.
or npm i --save-dev add-doc-route if you not intending to use it in production.
now you can display any openAPI/swagger/Redocly file in json or yaml formats using npx add-doc-route --run <the path to the file> in it will immediately display in the browser.