Swagger allows you to describe the structure of your APIs so that machines can read them. By reading your API’s structure, Swagger can automatically build interactive API documentation, automatically generate client libraries for API in many languages and explore other possibilities like automated testing. Swagger does this by asking your API to return a YAML or JSON that contains a detailed description of your entire API. This file is essentially a resource listing of your API which adheres to OpenAPI Specification. https://swagger.io/docs/specification/2-0/what-is-swagger/