github.com/kaisawind/go-swagger@v0.19.0/fixtures/codegen/todolist.simpleform.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    /singleValueQuery/{id}:
    17      get:
    18        operationId: simpleFormParams
    19        summary: all possible single value form parameters
    20        description: Used to see if a codegen can render all the possible parameter variations for a form param
    21        tags:
    22          - testcgen
    23        parameters:
    24          - name: id
    25            in: path
    26            type: integer
    27            format: int32
    28            description: The id of the task
    29            required: true
    30            minimum: 1
    31          - name: siString
    32            in: formData
    33            type: string
    34            description: a simple string
    35            required: true
    36            minLength: 5
    37            maxLength: 50
    38            pattern: "[A-Z][\\w-]+"
    39          - name: siInt
    40            in: formData
    41            type: integer
    42            description: an integer  property
    43            multipleOf: 2
    44            minimum: 8
    45            exclusiveMinimum: true
    46            maximum: 100
    47            exclusiveMaximum: true
    48          - name: siInt32
    49            in: formData
    50            type: integer
    51            format: int32
    52            description: an int32 integer property
    53            multipleOf: 2
    54            minimum: 8
    55            exclusiveMinimum: true
    56            maximum: 100
    57            exclusiveMaximum: true
    58          - name: siInt64
    59            in: formData
    60            type: integer
    61            format: int64
    62            description: an int64 integer property
    63            multipleOf: 2
    64            minimum: 8
    65            exclusiveMinimum: true
    66            maximum: 100
    67            exclusiveMaximum: true
    68            required: true
    69          - name: siFloat
    70            in: formData
    71            type: number
    72            description: a float property
    73            multipleOf: 1.5
    74            minimum: 3
    75            exclusiveMinimum: true
    76            maximum: 100
    77            exclusiveMaximum: true
    78          - name: siFloat32
    79            in: formData
    80            type: number
    81            format: float
    82            description: a float32 float property
    83            multipleOf: 1.5
    84            minimum: 3
    85            exclusiveMinimum: true
    86            maximum: 100
    87            exclusiveMaximum: true
    88          - name: siFloat64
    89            in: formData
    90            type: number
    91            format: double
    92            description: a float64 float property
    93            multipleOf: 1.5
    94            minimum: 3
    95            exclusiveMinimum: true
    96            maximum: 100
    97            exclusiveMaximum: true
    98            required: true
    99          - name: siBool
   100            in: formData
   101            type: boolean
   102            description: a boolean property
   103            required: true
   104  
   105        responses:
   106          default:
   107            description: Generic Error
   108          200:
   109            description: Task list result
   110            schema:
   111              $ref: "#/definitions/Task"
   112  
   113  definitions:
   114    Task:
   115      title: A Task object
   116      description: |
   117        This describes a task. Tasks require a content property to be set.
   118      required:
   119        - content
   120      type: object
   121      properties:
   122        id:
   123          title: the unique id of the task
   124          description: |
   125            This id property is autogenerated when a task is created.
   126          type: integer
   127          format: int64
   128          readOnly: true
   129        content:
   130          title: The content of the task
   131          description: |
   132            Task content can contain [GFM](https://help.github.com/articles/github-flavored-markdown/).
   133          type: string
   134          minLength: 5
   135        completed:
   136          title: when true this task is completed
   137          type: boolean
   138        creditcard:
   139          title: the credit card format usage
   140          type: string
   141          format: creditcard
   142        createdAt:
   143          title: task creation time
   144          type: string
   145          format: date-time
   146          readOnly: true
   147