Skip to content

Publish the tennis data vocabulary page and JSON - #15

Open
bensynapse wants to merge 2 commits into
mainfrom
docs/tennis-vocabulary
Open

bensynapse wants to merge 2 commits into
mainfrom
docs/tennis-vocabulary

Conversation

@bensynapse

Copy link
Copy Markdown
Member

Adds tennis-data-vocabulary.html and tennis-data-vocabulary.json to the docs. They say what each code the API returns means. The codes cover tournaments, rounds, surfaces, match results, event types, rankings, points and shots. That is 22 vocabularies and 164 codes, each with its own link.

Why

People joining tennis data keep running into codes that public datasets define differently. Masters is M in some and F in others, and ATP 500 and 250 share one letter. The spec already holds closed vocabularies for all of this, but spread across schemas. One page with a link per code gives a schema, a README or a column note something stable to cite.

How

  • scripts/build_reference.py reads the codes from openapi.yaml. Every code needs a meaning in VOCABULARIES, or the build fails and names it. The archive ?level= codes are read from that parameter's description, because it has no enum.
  • The page is a guide in the existing template. It is linked from the hub card list, the topic menu, sitemap.xml (with lastmod) and llms.txt.
  • The JSON is written next to the spec and covered by --check.
  • Meanings restate the field descriptions. Wording that would say where the data comes from was left out.

Checks

  • python3 scripts/build_reference.py --check and sh scripts/truthcheck.sh pass.
  • Rendered at 1528 and 390 px with no horizontal scroll. Headings run h1 then h2, and every table has a caption.
  • An independent review found no blockers. Its five should-fix items are in the second commit.

Live Tennis API added 2 commits November 6, 2026 12:33
Developers joining tennis data keep asking what a tier, round or level
code means, and public datasets disagree with each other. The API
already has closed vocabularies for all of these, spread across the
spec.

The generator now writes tennis-data-vocabulary.html and
tennis-data-vocabulary.json from openapi.yaml: 22 vocabularies and 164
codes, each with its meaning and its own link. Every code in the spec
must have a meaning in VOCABULARIES or the build fails, so a new code
cannot ship undocumented. The page is linked from the hub, the topic
menu, the sitemap and llms.txt.
The archive level codes are now read from the parameter text, so a new
code fails the build. The page says Q is not an archive filter value
and says where a field can be null or a list can grow. Stoppage events
name a player only where the feed carries one. Neutral meanings for
completed, Unresolved and ER.

This branch has not been deployed

No deployments
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