Skip to content

A required field cannot be nested beneath an absent optional field #429

Closed
@ghost

Description

I'm having some problems after #402, but don't know if this suppose to be in this ways or not.

I have a json with structure like that:

"aa": [
  {
    "bb": "some",
    "cc": {
      "dd": "some"
    }
  },
  {
    "bb": "something else",
    "cc": {
      "dd": "something more"
    }
  }
]

So, "cc" node is optional, but "dd" node is required.

After #402 I have to declare both "cc" and "dd" as optional, otherwise test fails. Which feels kind of wrong - if "cc" present, then it MUST have "dd".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions