title: How to write an OpenAPI (Swagger) definition for this field with multiple types?
body: <p>I'm writing an OpenAPI definition for the <code>params</code> field which is an object and contains a field called <code>name</code>, which is of string type by default but can be of any type, e.g. integer, number, boolean, string, or array of string, boolean, number, integer.</p>
  
  <p><strong>params: {
      [name: string]: int | string | number | boolean | int[] | string[] | number[] | boolean[]
    }</strong></p>
  
  <p>How can I define such a field in OpenAPI?</p>
  
  <p>I have tried the following</p>
  
  <pre class="lang-yaml prettyprint-override"><code>  params:
      description: Simple parameters map
      type: object
      additionalProperties:
        name:
          type: object
          oneOf:
            - type: string
            - type: boolean
            - type: integer
            - type: number
            - type: array
              items:
                - string
                - integer
                - number
                - boolean
  </code></pre>
  
  <p>but this produces the following syntax error:</p>
  
  <blockquote>
    <p>Should not include additional properties name.</p>
  </blockquote>