Содержание

#спецификация

#api

OpenAPI является спецификацией для описания REST API

paths:
    /pets:
        get:
            summary: List all pets
            operationId: listPets
            tags:
                - pets
            parameters:
                - name: limit
                in: query
                description: How many items to return at one time (max 100)
                required: false
                schema:
                    type: integer
                    format: int32
            responses:
                '200':
                description: An paged array of pets
                headers:
                    x-next:
                        description: A link to the next page of responses
                        schema:
                            type: string
                content:
                    application/json:    
                        schema:
                            $ref: "#/components/schemas/Pets"
            default:
                description: unexpected error
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/Error"

Swagger

Имплементация и представление OpenAPI

Если допустить ошибку при написании кода в редакторе Swagger, можно быстро исправить ее