Skip to content

Spec drift: smarkets — price and to_return moved from required to optional in fullcover order schema #545

@realfishsam

Description

@realfishsam

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

  1. Remove price and to_return from the required array in the fullcover order response schema in core/specs/smarkets.yaml
  2. Add ? optional markers or equivalent to signal they may be absent
  3. Check the Smarkets normalizer for any unguarded access to order.price or order.to_return on fullcover orders

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec-driftCached OpenAPI spec out of date vs venue's live docs

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions