What is Swagger?
On the Swagger site we can find the definition of Swagger:
Swagger is the world’s largest framework of API developer tools for the OpenAPI Specification(OAS), enabling development across the entire API lifecycle, from design and documentation, to test and deployment.
Swagger contains a large ecosystem of tools from which we can single out a set of core tools:
Swagger Editor is a tool that allows you to edit Swagger API specification inside your browser. While editing Swagger API specification, the tool will preview the documentation in real time. That way we can immediately see how documentation will look after applying the most recent changes. The editor is easy to use, has a clean user interface and has a lot of features to help you design and document RESTful APIs.
Swagger code generator is a template-driven engine that allows you to generate interactive documentation, API clients and server stubs from Swagger definitions. List of supported languages is quite extensive.
There are the pros and cons of Swagger Codegen:
- Generates server code, client code and documentation
- Allows quick changes of the API
- The code generator is open source
- Increase in project complexity by using additional tools and libraries
- Generates a lot of code that the user might not understand
Swagger UI allows anyone to visualize a RESTful API. Visualization is automatically generated from the Swagger specification. So Swagger UI takes an existing JSON or YAML document and creates interactive documentation.
Swagger editor to allow you to edit your *.yaml files