Skip to content

Add the required response description to the usage OpenAPI specs - #445

Merged
Lookoff-AIMLAPI merged 1 commit into
mainfrom
agent/fix-usage-spec-description
Jul 27, 2026
Merged

Add the required response description to the usage OpenAPI specs#445
Lookoff-AIMLAPI merged 1 commit into
mainfrom
agent/fix-usage-spec-description

Conversation

@Lookoff-AIMLAPI

Copy link
Copy Markdown
Member

Summary

After registering usage-v2 and usage-detail-v2 in GitBook, both came back processingState=complete but with one validation error each:

/paths/~1v2~1usage/get/responses/200
  oneOf must match exactly one schema in oneOf

OpenAPI 3.0 requires description on a Response Object. Without it the object matches neither Response nor Reference, so the union fails. Adds it to the 200 of both specs.

Impact

Cosmetic — the pages already render. For comparison, billing-v2 and billing-detail-v2 each carry ten processing errors (from their placeholder requestBody with "type": "–") and render fine. Mine had one. Still worth fixing rather than leaving a knowingly invalid spec.

After this merges, re-PUT both slugs through the GitBook API so it refetches from main.

GitBook reported "oneOf must match exactly one schema in oneOf" on the 200 of
both usage specs. OpenAPI 3.0 requires `description` on a Response Object, so
without it the object matches neither Response nor Reference and the union
fails.

Rendering already worked — the billing specs carry ten processing errors of
their own and render fine — but the specs should be valid.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Lookoff-AIMLAPI
Lookoff-AIMLAPI merged commit 665a321 into main Jul 27, 2026
1 check 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.

2 participants