github.com/kaisawind/go-swagger@v0.19.0/fixtures/codegen/todolist.allparams.yml (about)

     1  swagger: '2.0'
     2  
     3  info:
     4    version: "1.0.0"
     5    title: Private to-do list
     6    description: |
     7      A very simple api description that makes a json only API to submit to do's.
     8  
     9  produces:
    10    - application/json
    11  
    12  consumes:
    13    - application/json
    14  
    15  paths:
    16    /tasks:
    17      get:
    18        operationId: getTasks
    19        summary: Gets `Task` objects.
    20        description: |
    21          Optional query param of **size** determines
    22          size of returned array
    23        tags:
    24          - tasks
    25        parameters:
    26          - name: size
    27            in: query
    28            description: Size of task list
    29            type: integer
    30            format: int32
    31            default: 20
    32          - name: completed
    33            in: query
    34            description: when true shows completed tasks
    35            type: boolean
    36  
    37        responses:
    38          default:
    39            description: Generic Error
    40          200:
    41            description: Successful response
    42            schema:
    43              type: array
    44              items:
    45                $ref: "#/definitions/Task"
    46      post:
    47        operationId: createTask
    48        summary: Creates a 'Task' object.
    49        description: |
    50          Validates the content property for length etc.
    51        parameters:
    52          - name: type
    53            in: query
    54            required: false
    55            type: string
    56          - name: body
    57            in: body
    58            schema:
    59              $ref: "#/definitions/Task"
    60        responses:
    61          default:
    62            description: Generic Error
    63          201:
    64            description: Task Created
    65  
    66    /tasks/{id}:
    67      parameters:
    68        - name: id
    69          in: path
    70          type: integer
    71          format: int32
    72          description: The id of the task
    73          required: true
    74          minimum: 1
    75      put:
    76        operationId: updateTask
    77        summary: updates a task.
    78        description: |
    79          Validates the content property for length etc.
    80        tags:
    81          - tasks
    82        parameters:
    83          - name: body
    84            in: body
    85            description: the updated task
    86            schema:
    87              $ref: "#/definitions/Task"
    88        responses:
    89          default:
    90            description: Generic Error
    91          200:
    92            description: Task updated
    93            schema:
    94              $ref: "#/definitions/Task"
    95      delete:
    96        operationId: deleteTask
    97        summary: deletes a task
    98        description: |
    99          Deleting a task is irrevocable.
   100        tags:
   101          - tasks
   102        responses:
   103          default:
   104            description: Generic Error
   105          204:
   106            description: Task Deleted
   107  
   108    /singleValueQuery:
   109      get:
   110        operationId: getAllParameters
   111        summary: all possible single value query parameters
   112        description: Used to see if a codegen can render all the possible parameter variations for a query param
   113        responses:
   114          default:
   115            description: Generic Error
   116  
   117    /withBoolDefault:
   118      get:
   119        operationId: withBoolDefault
   120        tags:
   121          - tasks
   122        parameters:
   123          - name: verbose
   124            in: query
   125            type: boolean
   126            default: false
   127        responses:
   128          default:
   129            description: Generic Error
   130  
   131    /withArray:
   132      get:
   133        operationId: withArray
   134        tags:
   135          - tasks
   136        parameters:
   137          - name: sha256
   138            in: query
   139            required: true
   140            type: array
   141            items:
   142              type: string
   143              minLength: 64
   144              maxLength: 64
   145            collectionFormat: multi
   146        responses:
   147          default:
   148            description: Generic Error
   149  
   150  
   151  definitions:
   152    Task:
   153      title: A Task object
   154      description: |
   155        This describes a task. Tasks require a content property to be set.
   156      required:
   157        - content
   158      type: object
   159      properties:
   160        id:
   161          title: the unique id of the task
   162          description: |
   163            This id property is autogenerated when a task is created.
   164          type: integer
   165          format: int64
   166          readOnly: true
   167        content:
   168          title: The content of the task
   169          description: |
   170            Task content can contain [GFM](https://help.github.com/articles/github-flavored-markdown/).
   171          type: string
   172          minLength: 5
   173        completed:
   174          title: when true this task is completed
   175          type: boolean
   176        creditcard:
   177          title: the credit card format usage
   178          type: string
   179          format: creditcard
   180        createdAt:
   181          title: task creation time
   182          type: string
   183          format: date-time
   184          readOnly: true