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.4k stars 225 forks source link

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

Closed pguardiario closed 10 months ago

pguardiario commented 11 months ago

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

paras-verma commented 11 months 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 11 months 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 10 months ago

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