Skip to content

Add support to anyOf logic for conditional required fields #92

Description

@albertocsouto

Testing a new change in my project I've found this is currently not supported:

  • Handle schemas that use anyOf to express conditional required fields.

Example:

{
  "type": "object",
  "properties": {
    "type": { "type": "string" },
    "foo": { "type": "string" },
    "bar": { "type": "string" }
  },
  "anyOf": [
    { "required": ["foo"] },
    { "required": ["bar"] }
  ]
}

I have to test also oneOf and allOf

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    📑 TODO

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions