Ask the AI for a patch that fixes one finding (REQ-025). The doc does not change. An answer finding needs the author's answer.
const url = 'https://example.com/api/v1/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/findings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/fix';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"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/findings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/fix \ --header 'Content-Type: application/json' \ --data '{ "answer": "example", "option": 1 }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
For an answer finding, the fact the author gives. Speccy writes it into the doc in the doc’s style.
The option of a material gap that the answer is, 1 or 2, or 0 for the author’s own words.
Examplegenerated
{ "answer": "example", "option": 1}Responses
Section titled “ Responses ”The suggested 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
{ "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"}