Skip to content

Union type is not working when not at schema root #58

Description

@rperne

oneOf, for example, is working when we have it at schema root :

"content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                 

but not when in embedded in a sub schema :

"Animal": {
  "type": "object",
  "oneOf": [
    {
      "$ref": "#/components/schemas/Cat"
    },
    {
      "$ref": "#/components/schemas/Dog"
    }
  ],
  "discriminator": {
    "propertyName": "type",
    "mapping": {
      "cat": "#/components/schemas/Cat",
      "dog": "#/components/schemas/Dog"
    }
  }
},

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions