title: Create complex types (definitions) in Swagger
body: <p>I created a definition called <code>Product</code> and another called <code>Text</code> (see code).</p>
  
  <p>On <code>parameters</code> of <code>paths</code> I can not use the type <code>Text</code> created in definitions. On the definition <code>Product</code> I have a property called <code>message</code> and I want that property to be the type <code>Text</code> too.</p>
  
  <pre><code>(...)
  
  paths:
    /products:
      get:
        summary: Product Types
        description: |
          Description text
        parameters:
          - name: latitude
            in: query
            description: Latitude component of location.
            required: true
            ### The type Text was not found here
            type: Text ### The type Text was not found here
  (...)
  
  definitions:
  
    Product:
      properties:
        message:
          ### The type Text was not found here
          type: Text ### Compilation Error in this line ####
        name:
          type: string
          description: Data description.
  
  
    Text:
      properties:
        code:
          type: string
  </code></pre>
  
  <p>But this error occurs:</p>
  
  <blockquote>
    <p>Swagger Error:
    Data does not match any schemas from 'anyOf'.</p>
  </blockquote>
  
  <p>How can I reference the type <code>Text</code> on the type <code>Product</code>?</p>