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

     1  swagger: '2.0'
     2  basePath: "/v1/api"
     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    /singleValuePath/{siString}/{siInt}/{siInt32}/{siInt64}/{siFloat}/{siFloat32}/{siFloat64}/{siBool}:
    17      get:
    18        operationId: simplePathParams
    19        summary: all possible single value path parameters
    20        description: Used to see if a codegen can render all the possible parameter variations for a header param
    21        tags:
    22          - testcgen
    23        parameters:
    24          - name: siString
    25            in: path
    26            type: string
    27            description: a simple string
    28            required: true
    29            minLength: 5
    30            maxLength: 50
    31            pattern: "[A-Z][\\w-]+"
    32          - name: siInt
    33            in: path
    34            type: integer
    35            description: an integer  property
    36            required: true
    37            multipleOf: 2
    38            minimum: 8
    39            exclusiveMinimum: true
    40            maximum: 100
    41            exclusiveMaximum: true
    42          - name: siInt32
    43            in: path
    44            type: integer
    45            format: int32
    46            description: an int32 integer property
    47            required: true
    48            multipleOf: 2
    49            minimum: 8
    50            exclusiveMinimum: true
    51            maximum: 100
    52            exclusiveMaximum: true
    53          - name: siInt64
    54            in: path
    55            type: integer
    56            format: int64
    57            description: an int64 integer property
    58            required: true
    59            multipleOf: 2
    60            minimum: 8
    61            exclusiveMinimum: true
    62            maximum: 100
    63            exclusiveMaximum: true
    64            required: true
    65          - name: siFloat
    66            in: path
    67            type: number
    68            description: a float property
    69            required: true
    70            multipleOf: 1.5
    71            minimum: 3
    72            exclusiveMinimum: true
    73            maximum: 100
    74            exclusiveMaximum: true
    75          - name: siFloat32
    76            in: path
    77            type: number
    78            format: float
    79            description: a float32 float property
    80            required: true
    81            multipleOf: 1.5
    82            minimum: 3
    83            exclusiveMinimum: true
    84            maximum: 100
    85            exclusiveMaximum: true
    86          - name: siFloat64
    87            in: path
    88            type: number
    89            format: double
    90            description: a float64 float property
    91            multipleOf: 1.5
    92            minimum: 3
    93            exclusiveMinimum: true
    94            maximum: 100
    95            exclusiveMaximum: true
    96            required: true
    97          - name: siBool
    98            in: path
    99            type: boolean
   100            description: a boolean property
   101            required: true
   102  
   103        responses:
   104          default:
   105            description: Generic Error
   106          200:
   107            description: Task list result
   108            schema:
   109              $ref: "#/definitions/Task"
   110  
   111    /singleValueQuery/{id}:
   112      get:
   113        operationId: simpleQueryParams
   114        summary: all possible single value query parameters
   115        description: Used to see if a codegen can render all the possible parameter variations for a query param
   116        tags:
   117          - testcgen
   118        parameters:
   119          - name: id
   120            in: path
   121            type: integer
   122            format: int32
   123            description: The id of the task
   124            required: true
   125            minimum: 1
   126          - name: siString
   127            in: query
   128            type: string
   129            description: a simple string
   130            required: true
   131            minLength: 5
   132            maxLength: 50
   133            pattern: "[A-Z][\\w-]+"
   134          - name: siInt
   135            in: query
   136            type: integer
   137            description: an integer  property
   138            multipleOf: 2
   139            minimum: 8
   140            exclusiveMinimum: true
   141            maximum: 100
   142            exclusiveMaximum: true
   143          - name: siInt32
   144            in: query
   145            type: integer
   146            format: int32
   147            description: an int32 integer property
   148            multipleOf: 2
   149            minimum: 8
   150            exclusiveMinimum: true
   151            maximum: 100
   152            exclusiveMaximum: true
   153          - name: siInt64
   154            in: query
   155            type: integer
   156            format: int64
   157            description: an int64 integer property
   158            multipleOf: 2
   159            minimum: 8
   160            exclusiveMinimum: true
   161            maximum: 100
   162            exclusiveMaximum: true
   163            required: true
   164          - name: siFloat
   165            in: query
   166            type: number
   167            description: a float property
   168            multipleOf: 1.5
   169            minimum: 3
   170            exclusiveMinimum: true
   171            maximum: 100
   172            exclusiveMaximum: true
   173          - name: siFloat32
   174            in: query
   175            type: number
   176            format: float
   177            description: a float32 float property
   178            multipleOf: 1.5
   179            minimum: 3
   180            exclusiveMinimum: true
   181            maximum: 100
   182            exclusiveMaximum: true
   183          - name: siFloat64
   184            in: query
   185            type: number
   186            format: double
   187            description: a float64 float property
   188            multipleOf: 1.5
   189            minimum: 3
   190            exclusiveMinimum: true
   191            maximum: 100
   192            exclusiveMaximum: true
   193            required: true
   194          - name: siBool
   195            in: query
   196            type: boolean
   197            description: a boolean property
   198            required: true
   199  
   200        responses:
   201          default:
   202            description: Generic Error
   203          200:
   204            description: Task list result
   205            schema:
   206              $ref: "#/definitions/Task"
   207  
   208    /arrayValueQuery/{id}:
   209      get:
   210        operationId: arrayQueryParams
   211        summary: all possible array value query parameters
   212        description: Used to see if a codegen can render all the possible parameter variations for a array query param
   213        tags:
   214          - testcgen
   215        parameters:
   216          - name: id
   217            in: path
   218            type: integer
   219            format: int32
   220            description: The id of the task
   221            required: true
   222            minimum: 1
   223          - name: siString
   224            in: query
   225            type: array
   226            items:
   227              minLength: 5
   228              maxLength: 50
   229              pattern: "[A-Z][\\w-]+"
   230              type: string
   231            description: a simple string array
   232            required: true
   233            minItems: 5
   234            maxItems: 50
   235            collectionFormat: csv
   236          - name: siNested
   237            in: query
   238            type: array
   239            items:
   240              collectionFormat: pipes
   241              type: array
   242              items:
   243                collectionFormat: csv
   244                type: array
   245                items:
   246                  minLength: 5
   247                  maxLength: 50
   248                  pattern: "[A-Z][\\w-]+"
   249                  type: string
   250            description: a simple string array
   251            required: true
   252            minItems: 5
   253            maxItems: 50
   254            collectionFormat: multi
   255          - name: siInt
   256            in: query
   257            description: an integer array property
   258            type: array
   259            minItems: 5
   260            maxItems: 50
   261            collectionFormat: pipes
   262            items:
   263              type: integer
   264              multipleOf: 2
   265              minimum: 8
   266              exclusiveMinimum: true
   267              maximum: 100
   268              exclusiveMaximum: true
   269          - name: siInt32
   270            in: query
   271            description: an int32 integer array property
   272            type: array
   273            minItems: 5
   274            maxItems: 50
   275            collectionFormat: tsv
   276            items:
   277              type: integer
   278              format: int32
   279              multipleOf: 2
   280              minimum: 8
   281              exclusiveMinimum: true
   282              maximum: 100
   283              exclusiveMaximum: true
   284          - name: siInt64
   285            in: query
   286            description: an int64 integer array property
   287            type: array
   288            minItems: 5
   289            maxItems: 50
   290            collectionFormat: ssv
   291            items:
   292              type: integer
   293              format: int64
   294              multipleOf: 2
   295              minimum: 8
   296              exclusiveMinimum: true
   297              maximum: 100
   298              exclusiveMaximum: true
   299            required: true
   300          - name: siFloat
   301            in: query
   302            description: a float array property
   303            type: array
   304            minItems: 5
   305            maxItems: 50
   306            collectionFormat: multi
   307            items:
   308              type: number
   309              multipleOf: 1.5
   310              minimum: 3
   311              exclusiveMinimum: true
   312              maximum: 100
   313              exclusiveMaximum: true
   314          - name: siFloat32
   315            in: query
   316            description: a float32 float array property
   317            type: array
   318            minItems: 5
   319            maxItems: 50
   320            items:
   321              type: number
   322              format: float
   323              multipleOf: 1.5
   324              minimum: 3
   325              exclusiveMinimum: true
   326              maximum: 100
   327              exclusiveMaximum: true
   328          - name: siFloat64
   329            in: query
   330            description: a float64 float array property
   331            type: array
   332            minItems: 5
   333            maxItems: 50
   334            collectionFormat: pipes
   335            items:
   336              type: number
   337              format: double
   338              multipleOf: 1.5
   339              minimum: 3
   340              exclusiveMinimum: true
   341              maximum: 100
   342              exclusiveMaximum: true
   343            required: true
   344          - name: siBool
   345            description: a boolean array property
   346            in: query
   347            type: array
   348            minItems: 5
   349            maxItems: 50
   350            collectionFormat: ssv
   351            items:
   352              type: boolean
   353            required: true
   354        responses:
   355          default:
   356            description: Generic Error
   357          200:
   358            description: Task list result
   359            schema:
   360              $ref: "#/definitions/Task"
   361  
   362  definitions:
   363    Task:
   364      title: A Task object
   365      description: |
   366        This describes a task. Tasks require a content property to be set.
   367      required:
   368        - content
   369      type: object
   370      properties:
   371        id:
   372          title: the unique id of the task
   373          description: |
   374            This id property is autogenerated when a task is created.
   375          type: integer
   376          format: int64
   377          readOnly: true
   378        content:
   379          title: The content of the task
   380          description: |
   381            Task content can contain [GFM](https://help.github.com/articles/github-flavored-markdown/).
   382          type: string
   383          minLength: 5
   384        completed:
   385          title: when true this task is completed
   386          type: boolean
   387        creditcard:
   388          title: the credit card format usage
   389          type: string
   390          format: creditcard
   391        createdAt:
   392          title: task creation time
   393          type: string
   394          format: date-time
   395          readOnly: true
   396  
   397