github.com/kaisawind/go-swagger@v0.19.0/fixtures/bugs/1392/fixture-1392-3.yaml (about)

     1  swagger: "2.0"
     2  info:
     3    title: Bug Demo
     4    description: Test various body param configurations, with the exception of additionalProperties and additionalItems
     5    version: "0.1.0"
     6  schemes:
     7    - http
     8  produces:
     9    - application/json
    10  consumes:
    11    - application/json
    12  parameters:
    13    btest01:
    14      in: body
    15      name: myObject
    16      schema:
    17        $ref: '#/definitions/aNumberValidable'
    18    btest02:
    19      in: body
    20      name: myObject
    21      schema:
    22        $ref: '#/definitions/aSimpleArray'
    23    btest03:
    24      in: body
    25      name: myObject
    26      schema:
    27        $ref: '#/definitions/aComplexObject'
    28    btest04:
    29      in: body
    30      name: myObject
    31      schema:
    32        $ref: '#/definitions/aPrimitive'
    33    btest05:
    34      in: body
    35      name: myObject
    36      schema:
    37        $ref: '#/definitions/aPrimitiveNumber'
    38    btest06:
    39      in: body
    40      name: myObject
    41      schema:
    42        $ref: '#/definitions/aPrimitiveValidable'
    43    btest07:
    44      in: body
    45      name: myObject
    46      schema:
    47        $ref: '#/definitions/anAliasedPrimitive'
    48    btest08:
    49      in: body
    50      name: myObject
    51      schema:
    52        $ref: '#/definitions/anAliasedPrimitiveValidable'
    53    btest09:
    54      in: body
    55      name: myObject
    56      schema:
    57        $ref: '#/definitions/anAliasedObject'
    58    btest10:
    59      in: body
    60      name: myObject
    61      schema:
    62        $ref: '#/definitions/anAliasedObject2'
    63    btest11:
    64      in: body
    65      name: myObject
    66      schema:
    67        $ref: '#/definitions/anAliasedArray'
    68    btest12:
    69      in: body
    70      name: myObject
    71      schema:
    72        $ref: '#/definitions/aPrimitiveArray'
    73    btest13:
    74      in: body
    75      name: myObject
    76      schema:
    77        $ref: '#/definitions/anInterface'
    78    btest15:
    79      in: body
    80      name: myObject
    81      schema:
    82        $ref: '#/definitions/anArrayOfInterfaces'
    83    btest16:
    84      in: body
    85      name: myObject
    86      schema:
    87        $ref: '#/definitions/aNestedArray'
    88  paths:
    89    /bodybuilder18:
    90      post:
    91        description: body btest18
    92        parameters:
    93        - in: body
    94          name: myObject
    95          schema:
    96            type: object
    97            properties: 
    98              p1: 
    99                type: string
   100              p2: 
   101                type: integer
   102        responses:
   103          default:
   104            description: an error
   105    /bodybuilder19:
   106      post:
   107        description: body btest19
   108        parameters:
   109        - in: body
   110          name: myObject
   111          schema:
   112            type: array
   113            items:
   114              type: integer
   115              minimum: 100
   116        responses:
   117          default:
   118            description: an error
   119    /bodybuilder20:
   120      post:
   121        description: body btest20
   122        parameters:
   123        - in: body
   124          name: myObject
   125          schema:
   126            type: array
   127            uniqueItems: true
   128            items:
   129              type: string
   130              format: uri
   131        responses:
   132          default:
   133            description: an error
   134    /bodybuilder21:
   135      post:
   136        description: body btest21
   137        parameters:
   138        - in: body
   139          name: myObject
   140          schema:
   141            type: string
   142            enum:
   143              - str1
   144              - str2
   145        responses:
   146          default:
   147            description: an error
   148    /bodybuilder22:
   149      post:
   150        description: body btest22
   151        parameters:
   152        - in: body
   153          name: myObject
   154          schema:
   155            type: array
   156            minItems: 3
   157            items:
   158              type: array 
   159              uniqueItems: true
   160              items:
   161                type: string
   162                minLength: 6
   163                enum:
   164                - biz
   165                - wow
   166            enum:
   167              -
   168                - biz
   169                - wow
   170                - biz
   171                - wow
   172                - biz
   173                - wow
   174              -
   175                - wow
   176                - biz
   177                - wow
   178                - biz
   179                - wow
   180                - biz
   181        responses:
   182          default:
   183            description: an error
   184    /bodybuilder23:
   185      post:
   186        description: body btest23
   187        parameters:
   188        - in: body
   189          name: myObject
   190          schema:
   191            type: integer
   192            minimum: 15
   193            multipleOf: 10
   194        responses:
   195          default:
   196            description: an error
   197    /bodybuilder24:
   198      post:
   199        description: body btest24
   200        parameters:
   201        - in: body
   202          name: myObject
   203          schema:
   204            type: string
   205            format: duration
   206        responses:
   207          default:
   208            description: an error
   209    /bodybuilder25:
   210      post:
   211        description: body btest25
   212        parameters:
   213        - in: body
   214          name: myObject
   215          schema:
   216            type: string
   217            format: uri
   218            minLength: 10
   219            default: http://www.example.com
   220        responses:
   221          default:
   222            description: an error
   223    /bodybuilder26:
   224      post:
   225        operationId: PostBodybuilder26
   226        description: body btest26
   227        parameters:
   228        - in: body
   229          name: myObject
   230          schema:
   231            type: string
   232            format: date
   233            enum:
   234              - 1992-01-01
   235              - 2012-01-01
   236        - in: query           # <- mixup with query param
   237          name: myquery
   238          type: array
   239          collectionFormat: pipes
   240          items: 
   241            type: array
   242            items:
   243              type: string
   244              format: uri
   245              maxLength: 50
   246              maxItems: 10
   247              enum:           # <- exercise enum as a sliceValidation
   248              -
   249                - www.yahoo.com
   250                - www.google.com
   251              -
   252                - www.microsoft.com
   253                - www.oracle.com
   254          maxItems: 20
   255          enum:
   256            -
   257              -
   258                - www.yahoo.com
   259                - www.google.com
   260              -
   261                - www.microsoft.com
   262                - www.oracle.com
   263            -
   264              -
   265                - www.google.com
   266              -
   267                - www.oracle.com
   268        responses:
   269          default:
   270            description: an error
   271    /bodybuilder27:
   272      post:
   273        description: body btest27
   274        parameters:
   275        - in: body
   276          name: myObject
   277          schema:
   278            type: array
   279            items:
   280              type: array
   281              items:
   282                type: string
   283                format: date
   284                enum:
   285                  - 1992-01-01
   286                  - 2012-01-01
   287              enum:
   288                -
   289                  - 1992-01-01
   290                  - 2012-01-01
   291            enum:
   292              -
   293                -
   294                  - 1992-01-01
   295                  - 2012-01-01
   296        responses:
   297        responses:
   298          default:
   299            description: an error
   300  definitions:
   301    aNumberValidable:
   302      type: integer
   303      minimum: 10
   304      maximum: 100
   305    aSimpleArray:
   306      type: array
   307      items:
   308        type: string
   309        enum: [a,b]
   310    aComplexObject:
   311      type: object
   312      required: [prop1]
   313      properties:
   314        prop1:
   315          type: string
   316          format: uri
   317        prop2:
   318          type: string
   319          enum:
   320            - a
   321            - b
   322    aPrimitive:
   323      type: string
   324      minLength: 10
   325    aPrimitiveNumber:
   326      type: integer 
   327      format: uint32
   328      multipleOf: 10
   329    aPrimitiveValidable:
   330      type: string
   331      enum: [ primitive, civilized, outofthisworld ]
   332    anAliasedPrimitive:
   333      type: string
   334      format: uri
   335    anAliasedPrimitiveValidable:
   336      type: string
   337      format: duration
   338    anAliasedObject:
   339      $ref: '#/definitions/aComplexObject'
   340    anAliasedObject2:
   341      $ref: '#/definitions/anAliasedPrimitiveValidable'
   342    anAliasedArray:
   343      type: array
   344      maxItems: 6
   345      items:
   346        type: string
   347        format: uuid
   348    aPrimitiveArray:
   349      type: array
   350      maxItems: 6
   351      items:
   352        type: integer
   353        format: uint32
   354    anInterface:
   355      type: string 
   356      format: binary
   357      #anObjectOfInterfaces:
   358      #type: object
   359      #properties:
   360      #  aReader:
   361      #   type: string 
   362      #  format: binary
   363    anArrayOfInterfaces:
   364      type: array
   365      maxItems: 6
   366      items:
   367        type: string 
   368        format: binary
   369    aNestedArray:
   370      type: array 
   371      maxItems: 6
   372      items:
   373        type: array
   374        uniqueItems: true
   375        items:
   376          type: string
   377          format: date