node.jsexpressswaggerswagger-uikoa

Generate static API documentation from schema?


I've got Koa/Express apps and would like to generate a static documentation based on annotations to the different API routes.

Swagger seems to be good but all packages I found don't generate the documentation but host it with the API itself. I want the API documentation to be seperated from my API.

Are there modules other OS projects offering this?


Solution

  • Given that you've the OpenAPI/Swagger spec, you can try Swagger Codegen by going to https://editor.swagger.io. Under "Generate Client" select "HTML" or "Dynamic HTML"

    Or you can use https://restunited.com to generate both SDKs and documentation with code sample. Here is an example: http://restunited.com/docs/6y2jvtvkgvst

    Disclosure: I'm a top contributor to Swagger Codegen and founder of RESTUnited.com