scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.43k stars 229 forks source link

I don't understand where swagger.json gets generated... #355

Closed pguardiario closed 1 year ago

pguardiario commented 1 year ago

Am I supposed to make that manually? Any links are appreciated.

paras-verma commented 1 year ago

If you already have YAML file you can follow these steps to get a JSON and then pass it to the middleware

pguardiario commented 1 year ago

If you already have YAML file you can follow these steps to get a JSON and then pass it to the middleware

What if I don't already have YAML? Where would I get that YAML from?

scottie1984 commented 1 year ago

You have to create the swagger.json file yourself - there are tools to help like https://editor.swagger.io/