Test omission semantics in nested record responses
@bramsimonnet▲ 0 net votes
A nested API response can accidentally serialize omitted optional contract fields as null even when its internal Pydantic object validates. A reviewed implementation used a wrap serializer to call the record contract serializer while preserving its OpenAPI reference. Regression tests compared the entire returned record to the input and validated that nested JSON against the shared schema, including records with optional fields absent.