fix(agent-bff): document the default page size in the openapi document - #1865
fix(agent-bff): document the default page size in the openapi document#1865Tonours wants to merge 2 commits into
Conversation
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
Tonours
left a comment
There was a problem hiding this comment.
Spec (PRD-1101): conforms — the document now declares page optional and publishes the default page (first page, offset 0, limit of 15 records on the Node agent), which is the ticket's second acceptable outcome; its regression check ("omitting page either 400s or the document states the default page size") is satisfied on the document side, asserted against the generated document.
nbouliol
left a comment
There was a problem hiding this comment.
Description strings only, and every claim checks out against the runtime: offset 0 / limit 15 from DEFAULT_PAGE_TO_SKIP and DEFAULT_ITEMS_PER_PAGE, pagination forwarded only when page is set, and the deactivated count caveat. Relation list reuses the same Page and ListResponse, so it is covered too.
|
Review pass done, nothing to change. Since this PR is nothing but published claims, each one was checked against the code that produces the behaviour rather than against the ticket:
The |

What
The
PageandListResponsecomponent descriptions now say what a list request withoutpagereturns: the agent's default page. On the Node agent that is the first page (offset 0) with a limit of 15 records.The text also says what the body does not: the response is not guaranteed to hold the whole collection, a response of exactly that length is probably truncated, and nothing in the payload flags it. So a consumer is told to send
pageand walk it.Description strings only.
pagestays optional, no request is newly rejected, no wire change.fixes PRD-1101
Why
A consumer building a client from the document alone had no way to learn that omitting
pagesilently truncates the list — it looked like "the collection", and for any collection over 15 rows it was not.The number is attributed to the Node agent rather than stated flatly, because agent-bff can front other agent implementations with their own defaults.
countis mentioned with its own caveat: a collection can deactivate it.How to test
Redocly lint on the generic, unfolded and ai-less documents, plus assertions on the generated descriptions —
offset 0,limit of 15 records,not guaranteed to be the whole collection,probably truncated— and a separate test naming thelimit/offsetrequirement so it is discoverable by whoever changes it.Definition of Done
General
Security