Apply the finding's suggested patch to the current version as a new version (REQ-025). Speccy changes the doc only on this request.
POST
/runs/{runId}/findings/{findingId}/fix/accept
const url = 'https://example.com/api/v1/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/findings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/fix/accept';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"link_to":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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/accept \ --header 'Content-Type: application/json' \ --data '{ "link_to": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”runId
required
string format: uuid
findingId
required
string format: uuid
Request Body
Section titled “Request Body”Media typeapplication/json
object
link_to
For a missing upstream link, the spec doc the link names. It must be one of the suggestion’s link choices.
string format: uuid
Examplegenerated
{ "link_to": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”The result, with the new version when the fix made one.
Media typeapplication/json
object
version
object
id
required
string format: uuid
number
required
integer format: int64
created_by
required
string
message
required
string
created_at
required
string format: date-time
changed
required
False when the fix left the doc unchanged, so no version was created.
boolean
result
required
For a lint finding, whether the lint of the result still gives it. An AI finding needs a new review to check.
string
message
For still_fails, the finding the lint still gives.
string
Example
{ "result": "fixed"}default
Section titled “default”An error.
Media typeapplication/problem+json
RFC 9457 problem details with a stable code.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required
A stable machine-readable error code.
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}