Skip to content

feat(openapi): describe nextPage and previousPage as page paths - #27

Merged
kamil1094 merged 3 commits into
mainfrom
feat/page-paths-in-next-and-previous-page
Oct 15, 2026
Merged

kamil1094 merged 3 commits into
mainfrom
feat/page-paths-in-next-and-previous-page

Conversation

@kamil1094

Copy link
Copy Markdown
Contributor

What

List responses (GET /menu, GET /orders) now return page.nextPage and page.previousPage as the path of the adjacent page instead of a bare cursor:

"page": { "nextPage": "/menu?limit=10&after=G0EAAIyUqm8V", "previousPage": null, "limit": 10 }

This PR updates the description to match:

  • Page.yaml: the values are paths relative to the server URL (format: uri-reference), with examples. A path keeps the query parameters of the request and sets after (next) or before (previous); null still means there is no adjacent page.
  • After.yaml and Before.yaml: the cursor is the after/before query parameter of that path, so a client can request the path directly. Both parameters are still accepted.

The server URL is just the host (https://api.cafe.redocly.com), so serverUrl + nextPage and new URL(nextPage, serverUrl) give the same URL.

Merge order

Merge this after the API change is deployed to api.cafe.redocly.com, so the description never describes paths while the API still returns cursors.

🤖 Generated with Claude Code

List responses return `page.nextPage` and `page.previousPage` as the path of
the adjacent page, relative to the server URL, so a client can request it
directly. The path keeps the query parameters of the request and carries the
cursor in `after` or `before`, which the API still accepts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@redocly redocly Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cafe

AI Review: 🟢 Completed

Redocly Agent has reviewed your changes and found 1 potential issue(s).

Note

Low Risk

Documentation-only update to the OpenAPI specification and changelog aligning contract definitions with pagination behavior changes; no application runtime code is modified.

Overview

  • Updates Page schema (Page.yaml) to define nextPage and previousPage as relative URI paths (format: uri-reference) with preserved query parameters and illustrative examples.
  • Clarifies After and Before parameter descriptions to note that cursors are embedded in adjacent page paths.
  • Bumps API specification version to 1.1.0 in cafe.yaml and adds release notes to CHANGELOG.md.

Changed pages

* /changelog
* /openapi/cafe

Open preview

@kamil1094
kamil1094 marked this pull request as ready for review October 14, 2026 12:51

@vadyvas vadyvas 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.

can you also update changelog ?

Comment thread openapi/components/schemas/Page.yaml Outdated
kamil1094 and others added 2 commits October 15, 2026 10:32
…for page paths

`example` is deprecated on a Schema Object in OpenAPI 3.2, so the page path
examples use the JSON Schema `examples` list. The changed meaning of
`nextPage` and `previousPage` is listed under 1.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread openapi/components/schemas/Page.yaml
@kamil1094
kamil1094 merged commit bc9eaba into main Oct 15, 2026
6 of 7 checks passed
@kamil1094
kamil1094 deleted the feat/page-paths-in-next-and-previous-page branch October 15, 2026 09:55
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.

3 participants