Skip to content

Add support to anyOf logic for conditional required fields #92

@albertocsouto

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

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