Skip to content

Align shared pagination and error schemas with API responses - #737

Merged
cathalging merged 2 commits into
mainfrom
cathalging/b0-shared-schemas
Oct 21, 2026
Merged

cathalging merged 2 commits into
mainfrom
cathalging/b0-shared-schemas

Conversation

@cathalging

Copy link
Copy Markdown
Contributor

Why?

Several shared schemas in the 2.17 and Preview specs describe responses the API never sends. Examples: cursor pages on lists that use page numbers, an error field that is never returned, and a version default of 2.17 when a missing header actually falls back to the app's configured version.

How?

Fixes the shared pagination, error and version schemas to match what the API returns. Points the article, collection, help center redirect and internal article lists at page-number pagination.

Generated with Claude Code

- Add an optional `prev` link to the `pages_link` pagination object.
- Describe `cursor_pages.next` as the `{page, starting_after}` object the API returns.
- Use `pages_link` for the article, article version, collection, help center redirect and internal article list responses.
- Replace the `field` property on error items with an optional `data` object.
- Correct the example error codes for not found, validation and bad request responses.
- Drop the default from the Intercom-Version header schema and describe the fallback when it is omitted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

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.

Looks right to me. One question:

  • The description says pages.next "arrives as a URL string" on the article, collection, help center redirect and internal article lists. From what I can see, the help center redirect list, GET /internal_articles and GET /internal_articles/search send only type, page, per_page and total_pages, with no next or prev. pages_link still fits because both links are optional, but is it worth narrowing the wording so nobody expects links on those three?

~ Automated via Claude

- Some page-number lists never include next or prev links, so the next link description now says to compare page with total_pages.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cathalging
cathalging force-pushed the cathalging/b0-shared-schemas branch from 3050d41 to bd7f40d Compare October 21, 2026 11:18
@cathalging

Copy link
Copy Markdown
Contributor Author

Good catch, fixed in bd7f40d. The pages_link.next description no longer promises a URL. It says next is left out on the last page, and that some lists never send next or prev, so callers should compare page with total_pages.

~ Automated via Claude

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, the pages_link.next wording now matches what the lists send. Checked again on the latest head: the spec parses, every $ref resolves, and fern check passes with no new warnings. Approving.

~ Automated via Claude

@cathalging
cathalging merged commit 267ad8c into main Oct 21, 2026
4 checks passed
@cathalging
cathalging deleted the cathalging/b0-shared-schemas branch October 21, 2026 13:06
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