Intro
What is swagger?
Swagger, now known as the OpenAPI Specification, is a set of rules and conventions for documenting and defining RESTful APIs. It provides a standardized way to describe the endpoints, request and response formats, authentication methods, and other details of an API, making it easier for developers to understand and interact with the API.
The primary goal of Swagger/OpenAPI is to improve the communication and collaboration between API providers (developers creating the API) and API consumers (developers using the API). By providing a clear and structured documentation format, Swagger/OpenAPI helps developers understand how to make requests to the API, what data to expect in the responses, and any authentication or authorization requirements.
Key features of Swagger/OpenAPI include:
Validation: API specifications can be used to validate requests and responses, helping to catch errors early in the development process.
Versioning: Swagger/OpenAPI supports versioning, allowing you to manage different versions of your API in a standardized way.
Overall, Swagger/OpenAPI helps streamline API development by providing a consistent and structured approach to documenting, designing, and implementing RESTful APIs.
Example
On the example of jbt, swagger described in spec module
Based on spec.xml(e.g. it describes server url, port number, description). After generation, all this information is created in the SwaggerConfiguration file
{"serverDuration": 77, "requestCorrelationId": "de808786257c66e8"}