Skip to content

Describe the SDK-only attributes as legacy - #20

Closed
dsaiko wants to merge 2 commits into
mainfrom
docs/legacy-attribute-wording
Closed

dsaiko wants to merge 2 commits into
mainfrom
docs/legacy-attribute-wording

Conversation

@dsaiko

@dsaiko dsaiko commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

NOTES.md and a comment in schema/rest/types/sport_event_status.xsd
attributed the SDK-only attributes to a named third-party schema. This is a
public repository and that provenance should not be stated in it.

It also carried no information a reader needs. What matters about those
attributes is that no Oddin producer emits them and nothing consumes them —
which the surrounding text already says — not where they came from.

Wording only. No schema, fixture or tooling change; make check is green at
31 schemas / 41 payloads / 0 problems.

Raised by Primoz.

🤖 Generated with Claude Code

dsaiko and others added 2 commits September 9, 2026 09:52
The schema, the producers and the SDK models had drifted apart: the feed
emitted attributes no XSD declared, three schemas did not compile at all,
and the two copies of the same wire element disagreed with each other.

Attributes the producer sends and the schema did not declare:

- <scoreboard> on both wires: the cricket set (runs, wickets, overs,
  balls, coin toss), batting flags and inning, the table tennis games,
  and the missing clocks (time/game_time on rest, elapsed_time on both).
  The two lists now match the producer exactly, 35 for 35.
- <period_score> on both wires: the same cricket set, plus
  home_games/away_games for set based classic sports on the Gadget feed.
- <sport_event_status> on the feed: winner_id.
- <sport_event>: type, scheduled_end, start_time_tbd, inherited by
  <fixture>.
- the team types: country, country_code, virtual.
- <tv_channel>: start_time.

The audit that prompted this also listed match_status_code as missing
from the feed status; it is not sent there. See NOTES.md.

Messages that had no schema file: bet_stop, and the <response> error
envelope every REST endpoint returns on a non-2xx status.

One definition per shared wire element: <scoreboard> and <period_score>
are emitted identically on both wires, so their attribute lists moved to
schema/common and both schemas reference them. Where the two old copies
disagreed the producer decided, which corrected the per-period sub-scores
to xs:int, the scores to xs:double, and period_score/@Number to required.
<sport_event_status> stays two types because it genuinely differs between
the wires - documented in NOTES.md rather than papered over.

Bugs that no consumer could have worked around:

- match_summary.xsd, schedule.xsd and tournament_schedule.xsd did not
  compile: the "info" type was defined in fixtures_fixture.xsd but
  referenced from types/sport_event.xsd, and sportEventStatus extended
  its own base while redeclaring three of its attributes.
- 18 of 26 rest schemas declared targetNamespace http://schemas.oddin.gg/v1,
  which no response, producer or SDK ever used, so no real payload
  validated. Removed rather than spread to the other eight; neither wire
  uses a namespace now.
- sport/@id was typed as od:match:N; fixture_change/@sport_event_id
  rejected the tournament URNs the endpoint returns; player_profile was
  missing generated_at; an empty <players> or <sport_events> wrapper was
  invalid; a void reason could only carry one <param>.

So this cannot drift silently again, `make check` compiles every schema
and validates a captured payload for every message type and endpoint
against it. No type declares xs:anyAttribute, so an attribute a producer
starts sending without declaring it here fails the check, as does a
message type with no payload. CI runs it on every pull request.

NOTES.md records the conventions and a verdict per attribute that lives
in an SDK but on no wire, so the next reviewer does not re-derive them.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
NOTES.md and the REST sport_event_status comment attributed a group of
attributes to a named third-party schema. That provenance is not something
this public repository should state, and it carries no information a reader
of the schema needs: what matters is that no Oddin producer emits these
attributes and nothing consumes them, which the text already says.

Wording only - no schema, fixture or tooling change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dsaiko

dsaiko commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Landed on main directly: the commit was cherry-picked and squashed into 9d600c8, so this PR has nothing left to merge. Closing rather than merging keeps the linear history the ruleset requires.

The wording is verified gone from main — grep -iE 'betradar|sportradar|uof' across the tree returns nothing, and make check is green at 31 schemas / 41 payloads / 0 problems.

@dsaiko dsaiko closed this Sep 14, 2026
@dsaiko
dsaiko deleted the docs/legacy-attribute-wording branch September 14, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant