You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the checked-in Python producer data package for clemensv/real-time-sources, feeders/usgs-nwis-wq, MonitoringSite.county_code is Optional[str]. Constructing the generated record with county_code=None, then calling to_serializer_dict() or to_json(), emits "county_code": null. The authoritative JsonStructure contract allows the field to be absent but rejects null. Several optional WQ fields have this mismatch.
Expected
JSON serialization must retain the JsonStructure absence/nullability distinction. An absent optional non-nullable field must be omitted, while explicit nullable fields may emit null. Converting optional fields through an Avro nullable union must not silently broaden the JSON wire contract.
Observed consequence
Actual producer output fails strict validation against the checked-in authoritative schema. A permissive MQTT test helper previously removed got NoneType failures, so that helper concealed the mismatch.
Transitional containment
The USGS migration preserves frozen contracts/generated artifacts and supplies handwritten typed subclasses at the transport boundary that omit absent optional fields. Strict wire validation remains enabled. No generated files were hand-edited. This report concerns the codegen/JsonStructure-to-Python pipeline; the underlying implementation may belong in avrotize if original optionality can be retained there.
Activity