github.com/rzurga/go-swagger@v0.28.1-0.20211109195225-5d1f453ffa3a/fixtures/bugs/2405/fixture-2405.yaml (about)

     1  swagger: '2.0'
     2  basePath: /
     3  host: localhost
     4  info:
     5    version: 0.1.0
     6    title: Simple To Do List API
     7    description: |
     8      This is a simple todo list API
     9      illustrating go-swagger codegen
    10      capabilities.
    11    termsOfService: |
    12      There are actually none.
    13      This is for demonstration purpose only.
    14    license:
    15      name: 'Apache 2.0'
    16      url: https://www.apache.org/licenses/LICENSE-2.0
    17    contact:
    18      name: go-openapi maintainers
    19      email: nowhere@example.com
    20      url: https://github.com/go-openapi
    21  securityDefinitions:
    22    key:
    23      type: apiKey
    24      in: header
    25      name: x-todolist-token
    26  security:
    27    - key: []
    28  consumes:
    29    - application/io.swagger.examples.todo-list.v1+json
    30  produces:
    31    - application/io.swagger.examples.todo-list.v1+json
    32  schemes:
    33    - http
    34    - https
    35  x-schemes:
    36    - unix
    37  paths:
    38    /:
    39      get:
    40        operationId: find
    41        parameters:
    42          - name: limit
    43            in: formData
    44            type: integer
    45            format: int32
    46            required: true
    47            allowEmptyValue: true
    48          - name: "X-Rate-Limit"
    49            in: header
    50            type: integer
    51            format: int32
    52            required: true
    53          - name: tags
    54            in: formData
    55            type: array
    56            collectionFormat: multi
    57            allowEmptyValue: true
    58            items:
    59              type: integer
    60              format: int32
    61            required: true
    62        responses:
    63          '200':
    64            description: OK
    65            schema:
    66              type: array
    67              items:
    68                $ref: "#/definitions/item"
    69          default:
    70            description: error
    71            schema:
    72              $ref: "#/definitions/error"
    73      post:
    74        operationId: addOne
    75        parameters:
    76          - name: body
    77            in: body
    78            schema:
    79              $ref: "#/definitions/item"
    80        responses:
    81          '201':
    82            description: Created
    83            schema:
    84              $ref: "#/definitions/item"
    85          default:
    86            description: error
    87            schema:
    88              $ref: "#/definitions/error"
    89    /{id}:
    90      parameters:
    91        - type: string
    92          name: id
    93          in: path
    94          required: true
    95      put:
    96        tags: ["api"]
    97        operationId: updateOne
    98        parameters:
    99          - name: body
   100            in: body
   101            schema:
   102              $ref: "#/definitions/item"
   103        responses:
   104          '200':
   105            description: OK
   106            schema:
   107              $ref: "#/definitions/item"
   108          default:
   109            description: error
   110            schema:
   111              $ref: "#/definitions/error"
   112      delete:
   113        tags: ["todos"]
   114        operationId: destroyOne
   115        responses:
   116          '204':
   117            description: Deleted
   118          default:
   119            description: error
   120            schema:
   121              $ref: "#/definitions/error"
   122  definitions:
   123    item:
   124      type: object
   125      required:
   126        - description
   127      properties:
   128        id:
   129          type: integer
   130          format: int64
   131          readOnly: true
   132        description:
   133          type: string
   134          minLength: 1
   135        completed:
   136          type: boolean
   137    error:
   138      type: object
   139      required:
   140        - message
   141      properties:
   142        code:
   143          type: integer
   144          format: int64
   145        message:
   146          type: string