Documenting REST APIs with Swagger Editor

1.2k Views Asked by At

I have to document the REST APIs for one of the application using the Swagger Editor. I have gone through few of the references available but nothing seems to show the start point on Documenting the APIs.

https://swagger.io/docs/swagger-tools/#installation-11

Have downloaded the Swagger Editor and want to start on documenting. Any specific pointers to start on it would help.

Thanks.

With Regards, -Nayan Parikh

1

There are 1 best solutions below

0
On

I was able to start on the documenting the APIs. Following are the steps that i followed hope this would help someone in need.

Documenting using Swagger-Editor

  1. Open the Swagger Editor online https://editor.swagger.io/ OR
  2. Download from the link https://github.com/swagger-api/swagger-editor
  3. Go to the folder swagger-editor and Run the index.html
  4. This will open up the editor and start documenting the API based on the specification mentioned at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
  5. Once that is done download the it as JSON or YAML file.

Viewing it on Swagger-UI

  1. Download the swagger-ui from the link https://github.com/swagger-api/swagger-ui
  2. Go to the dist folder and Edit the index.html.
  3. Specify the JSON/YAML file you just downloaded above.
  4. Check it by running the index.html

Hope this helps

Thanks.