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

     1  ---
     2    swagger: "2.0"
     3    info: 
     4      title: "param body required with array of objects"
     5      version: "0.0.1"
     6      description: "repro issue 1537"
     7      license: 
     8        name: "Apache 2.0"
     9        url: "http://www.apache.org/licenses/LICENSE-2.0.html"
    10    definitions: 
    11      profileCfg:
    12        type: object
    13        properties:
    14          value1:
    15            type: integer
    16            format: int32
    17          value2:
    18            type: integer
    19            format: int32
    20      profileCfgs:
    21        type: array
    22        x-omitempty: true
    23        items:
    24          $ref: '#/definitions/profileCfg'
    25      Profile:
    26        type: object
    27        properties:
    28          profileCfg:
    29            $ref: '#/definitions/profileCfgs'
    30      ProfileRequired:
    31        type: object
    32        required:
    33          - profileCfg
    34        properties:
    35          profileCfg:
    36            $ref: '#/definitions/profileCfgs'
    37      ProfileArray:
    38        type: object
    39        required:
    40          - profileCfg
    41        properties:
    42          profileCfg:
    43            type: array
    44            x-omitempty: true
    45            items:
    46              $ref: '#/definitions/profileCfg'
    47    paths: 
    48      /getProfileCfg: 
    49        get: 
    50          operationId: getProfileCfg
    51          parameters:
    52            - name: profileCfgInBody
    53              in: body
    54              required: false
    55              schema:
    56                $ref: '#/definitions/profileCfg'
    57          responses: 
    58            200: 
    59              description: "OK"
    60      /getProfileCfgs: 
    61        get: 
    62          operationId: getProfileCfgs
    63          parameters:
    64            - name: profileCfgsInBody
    65              in: body
    66              required: false
    67              schema:
    68                $ref: '#/definitions/profileCfgs'
    69          responses: 
    70            200: 
    71              description: "OK"
    72      /getProfileCfgsSanity: 
    73        get: 
    74          operationId: getProfileCfgsSanity
    75          parameters:
    76            - name: profileCfgsInBodySanity
    77              in: body
    78              required: false
    79              schema:
    80                type: array
    81                items:
    82                  $ref: '#/definitions/profileCfg'
    83          responses: 
    84            200: 
    85              description: "OK"
    86      /getProfile: 
    87        get: 
    88          operationId: getProfile
    89          parameters:
    90            - name: profileInBody
    91              in: body
    92              required: false
    93              schema:
    94                $ref: '#/definitions/Profile'
    95          responses: 
    96            200: 
    97              description: "OK"
    98      /getProfileRequired: 
    99        get: 
   100          operationId: getProfileRequired
   101          parameters:
   102            - name: profileRequiredInBody
   103              in: body
   104              required: false
   105              schema:
   106                $ref: '#/definitions/ProfileRequired'
   107          responses: 
   108            200: 
   109              description: "OK"