Documentation
¶
Overview ¶
Command requiredgen emits required_fields.json: per message, the JSON field names whose proto ZERO value is rejected by the field's own protovalidate rule (an enum not_in:[0], a string min_len≥1 or a pattern that rejects "", a numeric gte≥1, or an explicit required). Those fields are required on the wire but the JSON Schema protoschema emits leaves them optional; merge_schema reads this manifest to mark them `required` (and drop the zero default) so the generated Pydantic/Zod reject omission, matching the Go server.
This is the single, authoritative source of "is the zero value invalid" (the same Go protovalidate the conformance corpus is labeled against), consumed by scripts/gen-sdk-types.sh so the Python bridge does not re-implement the rule semantics.