Summary
Smarkets changed price and to_return from required to optional fields in the fullcover order response schema. Our spec declares them as required, which means spec-strict validation will flag valid API responses that omit these fields as invalid.
Impact
LOW — no functional breakage in production code (optional vs required only matters for validation). However, code that assumes price and to_return are always present may have unguarded access.
Details
- Fields:
price (string, decimal) and to_return (string, decimal) on fullcover order responses
- Change: moved from
required to optional in Smarkets API schema
- Spec file:
core/specs/smarkets.yaml, fullcover order response schema
- These fields are now absent when the fullcover order is in certain pending states
Required Fix
- Remove
price and to_return from the required array in the fullcover order response schema in core/specs/smarkets.yaml
- Add
? optional markers or equivalent to signal they may be absent
- Check the Smarkets normalizer for any unguarded access to
order.price or order.to_return on fullcover orders
Summary
Smarkets changed
priceandto_returnfrom required to optional fields in the fullcover order response schema. Our spec declares them as required, which means spec-strict validation will flag valid API responses that omit these fields as invalid.Impact
LOW — no functional breakage in production code (optional vs required only matters for validation). However, code that assumes
priceandto_returnare always present may have unguarded access.Details
price(string, decimal) andto_return(string, decimal) on fullcover order responsesrequiredtooptionalin Smarkets API schemacore/specs/smarkets.yaml, fullcover order response schemaRequired Fix
priceandto_returnfrom therequiredarray in the fullcover order response schema incore/specs/smarkets.yaml?optional markers or equivalent to signal they may be absentorder.priceororder.to_returnon fullcover orders