docs(leagues): replace stale Leagues-by-Sport table with live-endpoint pointer (Item #3)#219
Merged
Merged
Conversation
…t pointer
The hand-maintained "Leagues by Sport" table covered 16 leagues across
8 sports against the atlas registry's 600+ entries. Two problems:
1. Drift trap: required manual update on every registry addition.
Last comprehensive ~12 months ago, silently shrinking in coverage
relative to the actual catalog.
2. Wrong canonical IDs: showed `epl`, `la_liga`, `serie_a`,
`bundesliga`, `mls` — none are the registry's canonical slug
forms (`england_-_premier_league`, `spain_-_la_liga`,
`italy_-_serie_a`, `germany_-_bundesliga`,
`usa_-_major_league_soccer`). The API does accept short forms
for backward compat, but `/leagues` returns the canonical slug
and other endpoints emit it on response payloads — clients
coding to the doc example see mismatches.
Replaced with a "Common Leagues" section that:
- Is honest about being illustrative not exhaustive
- Uses canonical slug form for soccer (the most affected sport)
- Adds programmatic-access guidance ("never hard-code a list, call
/api/v1/leagues") in the callout
- Mentions registry breadth (600+ leagues / 30+ sports) so readers
understand the table is a tiny subset
Closes the last of 4 drift traps in League Normalization Item #3
(api-adapters#538, sharp-api-go#367, sharpapi-site#87, this PR).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the last of 4 drift traps named in [[League Normalization Next Steps]] §Item #3. After this lands: api-adapters#538 + sharp-api-go#367 + sharpapi-site#87 + this PR fully address the original wiki entry.
Problem
content/en/api-reference/leagues.mdxhad a hand-maintained "Leagues by Sport" table with 16 entries across 8 sports — against the atlas registry's 600+ leagues across 30+ sports.Two issues:
epl,la_liga,serie_a,bundesliga,mls. None are the registry's canonical slug forms (england_-_premier_league,spain_-_la_liga,italy_-_serie_a,germany_-_bundesliga,usa_-_major_league_soccer). The API does accept short forms for backward compat, but/leaguesreturns canonical slugs and other endpoints emit them on response payloads. Clients copying the doc example saw theireplfilter "work" but their response-sideeventIdcome back containingengland_-_premier_leagueand assumed our docs were lying.Fix
Replace the static table with a "Common Leagues" callout that:
Diff
content/en/api-reference/leagues.mdx: 63 lines → 15 lines (the static 8-section table → a single illustrative table + callout). Net -48 lines, +15 lines.Test plan
npm run buildclean (full Next.js + Nextra static export, exit 0)🤖 Generated with Claude Code