github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/examples/tutorials/todo-list/dynamic-1/swagger.yml (about)

     1  swagger: "2.0"
     2  info:
     3    description: The product of a tutorial on goswagger.io
     4    title: A To Do list application
     5    version: 1.0.0
     6  consumes:
     7  - application/io.goswagger.examples.todo-list.v1+json
     8  produces:
     9  - application/io.goswagger.examples.todo-list.v1+json
    10  schemes:
    11  - http
    12  paths:
    13    /:
    14      get:
    15        tags:
    16          - todos
    17        operationId: findTodos
    18        parameters:
    19          - name: since
    20            in: query
    21            type: integer
    22            format: int64
    23          - name: limit
    24            in: query
    25            type: integer
    26            format: int32
    27            default: 20
    28        responses:
    29          200:
    30            description: list the todo operations
    31            schema:
    32              type: array
    33              items:
    34                $ref: "#/definitions/item"
    35          default:
    36            description: generic error response
    37            schema:
    38              $ref: "#/definitions/error"
    39      post:
    40        tags:
    41          - todos
    42        operationId: addOne
    43        parameters:
    44          - name: body
    45            in: body
    46            schema:
    47              $ref: "#/definitions/item"
    48        responses:
    49          201:
    50            description: Created
    51            schema:
    52              $ref: "#/definitions/item"
    53          default:
    54            description: error
    55            schema:
    56              $ref: "#/definitions/error"
    57    /{id}:
    58      parameters:
    59        - type: integer
    60          format: int64
    61          name: id
    62          in: path
    63          required: true
    64      put:
    65        tags:
    66          - todos
    67        operationId: updateOne
    68        parameters:
    69          - name: body
    70            in: body
    71            schema:
    72              $ref: "#/definitions/item"
    73        responses:
    74          200:
    75            description: OK
    76            schema:
    77              $ref: "#/definitions/item"
    78          default:
    79            description: error
    80            schema:
    81              $ref: "#/definitions/error"
    82      delete:
    83        tags:
    84          - todos
    85        operationId: destroyOne
    86        responses:
    87          204:
    88            description: Deleted
    89          default:
    90            description: error
    91            schema:
    92              $ref: "#/definitions/error"
    93  definitions:
    94    item:
    95      type: object
    96      required:
    97        - description
    98      properties:
    99        id:
   100          type: integer
   101          format: int64
   102          readOnly: true
   103        description:
   104          type: string
   105          minLength: 1
   106        completed:
   107          type: boolean
   108    error:
   109      type: object
   110      required:
   111        - message
   112      properties:
   113        code:
   114          type: integer
   115          format: int64
   116        message:
   117          type: string