Given the schema:
{
"$id": "https://jschon.dev/schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["p1", "p2"],
"properties": {
"p1": {"type": "string", "default": "def_val"},
"p2": {"type": "integer", "default": 7, "minimum": 5},
"p3": {"type": "string"}
}
}
following document does not validate:
{
"p2": 6,
"p3": "test_p3"
}
Finally, as a result of validation, I would like to be able to get document that was validated extended with all fields with default values that were not present in original document.