Skip to content

Rename rate-limit headers to X-RateLimit-* (closes #265) - #271

Merged
getorymckeag merged 1 commit into
trolie:1.0from
piyush15102003:fix/ratelimit-header-names
Sep 23, 2026
Merged

getorymckeag merged 1 commit into
trolie:1.0from
piyush15102003:fix/ratelimit-header-names

Conversation

@piyush15102003

Copy link
Copy Markdown
Contributor

Title: Rename rate-limit headers to X-RateLimit-* (closes #265)

What

Renames X-Rate-Limit-Limit / X-Rate-Limit-Remaining / X-Rate-Limit-Reset to
X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-Reset everywhere in the
dev spec and the docs:

  • docs/_spec/openapi-split.yaml — the three components.headers entries and the shared
    &rate-limited-headers block that the 304 and 429 responses reuse
  • docs/articles/conditional-GET.md, docs/articles/how-units-are-handled.md,
    docs/example-narratives/submitting-forecasts.md — example responses

Why

#265: the X-Rate-Limit-* spelling doesn't match the widely-used X-RateLimit-*
convention that preceded the IETF RateLimit header draft. This PR follows the spelling
the issue asks for. If the working group would rather jump straight to the un-prefixed
IETF RateLimit-* fields, I'm happy to redo it that way — it's the same set of files.

Not changed

  • docs/openapi-1.0.yaml is the published 1.0 bundle; the documentation workflow regenerates
    it from openapi-split.yaml, so I didn't hand-edit it.
  • trolie/java-client-sdk doesn't read these headers, so no client change is needed.

Testing

redocly lint trolie@dev (same CLI version as the lint workflow, 1.8.2) reports the same
22 pre-existing findings before and after this change; none reference the renamed headers.

The spec and the narrative articles used X-Rate-Limit-{Limit,Remaining,Reset}.
The de-facto convention that predates the IETF RateLimit header fields draft
(and which the issue asks for) is X-RateLimit-*, so rename the header
components, the shared 304/429 header blocks and every example response.

The released docs/openapi-1.0.yaml is left untouched; it is regenerated from
docs/_spec/openapi-split.yaml by the documentation workflow.

@getorymckeag getorymckeag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I was supposed to get to this.

@getorymckeag
getorymckeag merged commit d99469a into trolie:1.0 Sep 23, 2026
3 checks passed
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.

Migrate docs from X-Rate-Limit-* to X-RateLimit-* following the IETF draft standard

2 participants