Write the answers of the questions screen into the doc as patches. The doc does not change. Answers whose text overlaps share one patch. A patch that suggestFix wrote for the same answer on the current version is reused.
const url = 'https://example.com/api/v1/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/answers';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"answers":[{"finding_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","answer":"example","option":1}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/answers \ --header 'Content-Type: application/json' \ --data '{ "answers": [ { "finding_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "answer": "example", "option": 1 } ] }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Examplegenerated
{ "answers": [ { "finding_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "answer": "example", "option": 1 } ]}Responses
Section titled “ Responses ”The patches.
object
One patch for each part of the doc. Two answers about one paragraph share a patch. Accept them with acceptFixes, by the finding_id of each patch.
A patch that replaces one text in one file (REQ-025). Speccy picks the text: the paragraph or the section of the finding, or no text when the fix adds a section. The model writes only the new text.
object
The text the patch replaces. Empty when the patch adds text.
The line where the replaced text starts, or where the new text goes, from 1.
The version the patch was written for.
For a patch from the questions screen, every finding whose answer it writes. finding_id is the first.
For a missing upstream link, the docs the link can name. The patch is empty; the person picks one, and Speccy writes the link (#75).
object
The doc’s path relative to the root of its source.
Examplegenerated
{ "patches": [ { "finding_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "file": "example", "old": "example", "new": "example", "line": 1, "end_line": 1, "explanation": "example", "version_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "answers": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "link_choices": [ { "doc_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "title": "example", "path": "example", "profile": "example" } ] } ]}default
Section titled “default”An error.
RFC 9457 problem details with a stable code.
object
A stable machine-readable error code.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}