--- swagger: "2.0" host: example.cm info: title: "test" version: "1" paths: "/test": get: responses: 200: description: "" schema: '$ref': '#/definitions/resource1' definitions: resource1: discriminator: type required: - type properties: type: type: string enum: - 'custom' custom: description: a custom resource1 allOf: - '$ref': '#/definitions/resource1' - properties: hello: type: string