title: Invalid Swagger spec: swagger spec at "swagger.yml" is invalid against swagger specification 2.0
body: <p>I am trying to use Swagger. Below is the <code>swagger.yml</code> file.</p>
  <pre><code>swagger: &quot;2.0&quot;
  basePath: /myapp/api
  info:
    description: My description
    title: My title
    version: 0.1.0
  produces:
    - application/json
  consumes:
    - application/json
  schemes:
    - http
  paths:
    /contract:
      get:
        operationId: &quot;Get contract&quot;
        description: Get information
        parameters:
          - in: path
            name: contractId
              description: ID
            required: true
            schema:
              type: integer
        responses:
          200:
            description: Information...
            schema:
              $ref: &quot;#/definitions/contract&quot;
          404:
            description: &quot;Not found.&quot;
      post:
        operationId: &quot;Create&quot;
        parameters:
          - in: body
            name: contractId
            schema:
              $ref: '#/definitions/requestBodies/contract'
        responses:
          200:
            description: Success...
          400:
            description: Problem...
  definitions:
    contract:
      title: Contract
      type: object
      properties:
        name:
          title: Name
          type: string
        services:
          title: Services
          type: array
          items:
            title: Service
            $ref: '#/definitions/service'
        xyz:
          title: Xyz
          $ref: '#/definitions/virtualMachine'
    service:
      title: Service
      type: object
      properties:
        containerName:
          title: ContainerName    
          type: string
        ...
        contracts:
          title: Contracts
          type: array
          items:
            title: Contract
            $ref: '#/definitions/contract'    
    xyz:
      title: Xyz 
      type: object
      properties:
        serverId:
          title: ServerID
          type: string
        contractId:
          title: ContractID
          type: uuid  
        ...  
    requestBodies:
      contract:
        content:
          application/json:
            schema:
              $ref: '#/definitions/contract'
  </code></pre>
  <p>When I try to generate the documentation, I get the following error:</p>
  <pre><code>swagger generate server -f swagger.yml 
  2020/10/26 15:43:31 validating spec /home/dalton/workspace/.../.../swagger.yml
  The swagger spec at &quot;/home/dalton/workspace/.../.../swagger.yml&quot; is invalid against swagger specification 2.0. see errors :
  - definitions.requestBodies.contract in body is a forbidden property
  - &quot;definitions.xyz.properties.contractId.type&quot; must validate at least one schema (anyOf)
  - definitions.xyz.properties.contractId.type in body must be of type array: &quot;string&quot;
  </code></pre>
  <p>What am I doing wrong?</p>