New request
#20003: OpenAPI description and JSON Output do not match for Paging Data
We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.
Bug Description
In the OpenApi description for all apis, there is this paging information:
{
"pageInfo": {
"type": "object",
"properties": {
"hasNextPage": {
"type": "boolean"
},
"startCursor": {
"type": "string",
"format": "uuid"
},
"endCursor": {
"type": "string",
"format": "uuid"
}
}
}
}
and also in the examples
<img width="525" height="168" alt="Image" src="https://github.com/user-attachments/assets/8e207245-32ed-4c14-8c73-4e0ffab8496e" />however, no uuids are returned for startCursor or endCursor
{
"data": {
"companies": []
},
"totalCount": 8,
"pageInfo": {
"startCursor": "eyJpZCI6IjQ4MTQ4MjhhLWM3ZWEtNGVhZi04YmIxLThhODg2NmI0MWY4MiJ9",
"endCursor": "eyJpZCI6ImZkNGI3MThhLWU2MzktNDZlMC1hNGJhLWRjNWE0NWYxM2FmYSJ9",
"hasNextPage": false,
"hasPreviousPage": false
}
}
This appears to be happening across all apis, however I have only tested it for companies and dashboards
Expected behavior
I should not get "format": "uuid" for startCursor and endCursor in the openapi description
or
I should get UUIDs for both according to the OpenApi description, but not inconsistent results.
Technical inputs
I decoded the cursor data, it says
{"id":"4814828a-c7ea-4eaf-8bb1-8a8866b41f82"}
in base64
The OpenAPI schema incorrectly declares cursor fields as UUID format while the API returns base64-encoded strings; this is a localized schema decorator/fixture change in a shared pagination DTO.
- packages/twenty-server/src/engine/core-modules/open-api/dtos/pagination.dto.ts
- packages/twenty-server/src/engine/core-modules/open-api/utils/schema-builder.util.ts
- packages/twenty-server/src/engine/core-modules/open-api/open-api.service.ts