Writing api-doc for Swagger

I am trying to use the Swagger frontend and it says that I should start by writing an api-doc that describes the exact api for the REST api. The problem is I have no idea what this means. Is this document written in plain English? Or is there a specific format that the user interface can generate?

Thank!

+3


source to share


1 answer


Swagger is a specification for describing REST APIs. The specification documentation can be found here - https://github.com/swagger-api/swagger-spec .

Typically, there are two ways to document your API. If you already have an API with code, you can use any of the existing libraries ( https://github.com/swagger-api/swagger-spec#additional-libraries ) to integrate into your code and generate documentation at runtime. Some of these libraries also offer offline creation of such documents.



If you want to develop an API or don't want to integrate another library into your application, you can use https://github.com/swagger-api/swagger-editor locally or using the online version - http://editor.swagger.io .

Once you have the documentation, you can use the Swagger UI to render and test.

+5


source







All Articles