title: How to define a parameter that accepts an array of arbitrary objects in OpenAPI (Swagger)?
body: <p>Within my OpenAPI spec is it possible to define a parameter as an object without having to define its properties (an anonymous object)? More specifically, I want my API to be able to accept an array of these anonymous objects.</p>
  
  <p>Here's what I have, but I'm getting an "invalid parameter definition" error in the Swagger Editor.</p>
  
  <pre class="lang-yaml prettyprint-override"><code>swagger: '2.0'
  info:
    title: Test API
    description: Test
    version: "1.0.0"
  host: api.example.com
  schemes:
    - https
  basePath: /v1
  produces:
    - application/json
  paths:
    /api/example:
      post:
        description: Endpoint description
        parameters:
          - name: param1
            in: query
            description: param1
            required: true
            type: array
            items:
              type: object
          - name: param2
            in: query
            description: param2
            required: true
            type: string
        responses:
          200:
            description: error response
            schema:
              type: object
          default:
            description: Unexpected error
            schema:
              $ref: '#/definitions/Error'
  definitions:
    Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        fields:
          type: string
  </code></pre>
  
  <p>Here's the error:</p>
  
  <pre><code>Object
  code:  "ONE_OF_MISSING"
  params: Array [0]
  message:  "Not a valid parameter definition"
  path: Array [5]
  schemaId:  "http://swagger.io/v2/schema.json#"
  inner: Array [2]
  0: Object
  code:  "ONE_OF_MISSING"
  params: Array [0]
  message:  "Data does not match any schemas from 'oneOf'"
  path: Array [5]
  inner: Array [2]
  1: Object
  code:  "OBJECT_MISSING_REQUIRED_PROPERTY"
  params: Array [1]
  0:  "$ref"
  message:  "Missing required property: $ref"
  path: Array [5]
  0:  "paths"
  1:  "/api/example"
  2:  "post"
  3:  "parameters"
  4:  "0"
  level: 900
  type:  "Swagger Error"
  description:  "Not a valid parameter definition"
  lineNumber: 23
  </code></pre>