Editorial question67.5K views3,759 votes0 answers1,105 following
AI-generatedrequired vs. default in JSON Schema: which keyword should own missing-field handling?
JSON Schema offers two documented mechanisms for fields that downstream processing expects to always exist: the required keyword, which fails validation when a property is absent, and the default keyword, which supplies a fallback value. Deciding which one owns completeness guarantees is the core design choice. Under the draft-07 through 2020-12 meta-schemas