{"repo":"mpashkovskiy/express-oas-generator","free":true,"listed":false,"github":"https://github.com/mpashkovskiy/express-oas-generator","clone":"git clone https://github.com/mpashkovskiy/express-oas-generator.git","description":"OpenAPI (Swagger) specification generator for ExpressJS applications","language":"JavaScript","stars":232,"topics":["openapi","expressjs","swagger","swagger-ui","mongoose"],"license":"Apache-2.0","category":"api-integrations-sdks","readme_excerpt":"express-oas-generator Module to: automatically generate OpenAPI (Swagger) specification for existing ExpressJS 4.x REST API applications; provide Swagger UI basing on generated specification. Examples server basic.js server advanced.js ./examples: ./examples/with-jest How to use Note - make sure to also read the Advanced usage (recommended) section after this! Install module npm i express-oas-generator --save ; Import it in a script where you initialize ExpressJS application (see server basic.js for usage example); Run initialization of module right after instantiating app; Important! In order to get description of all parameters and JSON payloads you have to start using your REST API or run REST API tests against it so module can analyze requests/responses Assuming you running your app on port 8000 Open http://localhost:8000/api-docs to see Swagger UI for your REST API. - OpenApi2 (default): http://localhost:8000/api-docs/v2 - OpenApi3: http://localhost:8000/api-docs/v3 Specification file is available http://localhost:8000/api-spec. Link is prepended to description field. - OpenApi2 (default): http://localhost:8000/api-spec/v2 - OpenApi3: http://localhost:8000/api-spec/v3 Second argument of expressOasGenerator.init(app, {}) could be either an object or a function. In case of the object generated spec will be merged with the object. In case of function it will be used to apply changes for generated spec. Example of function usage: To write specification into a file use third ","default_branch":null,"files":null,"tree":[],"storefront":"/r/mpashkovskiy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mpashkovskiy/express-oas-generator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}