swagger: '2.0' info: title: Title description: some description contact: name: John Doe url: https://www.acme.com/support email: support@acme.com version: "1.0.0" paths: /: get: responses: 200: description: Example path schema: type: string default: description: generic error schema: type: string definitions: ExecuteValues: type: object properties: Value: $ref: "#/definitions/ExecuteValue" Array: type: array items: $ref: "#/definitions/ExecuteValues" ExecuteValue: type: object discriminator: ValueType required: - ValueType properties: ValueType: type: string Test: type: string ExecutableValueString: allOf: - $ref: '#/definitions/ExecuteValue' - type: object properties: something: type: string