Skip to content

Feature request: automatically add nested defaults #178

Description

@theahura

If I have a jsonschema like:

schema = {
    "type": "object",
    "properties": {
        "foo": {
            "type": "object",
            "properties": {
                "bar": {
                    "type": "string",
                    "default": "bar"
                }
            }
        },
    },
    "required": [],
    "additionalProperties": False
}

the output of validation will be

{}

instead of

{
  foo: {
    bar: "bar"
  }
}

is there a way to make it so that nested defaults are automatically populated?

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions