Skip to main content

Review suggestions

Generated from apiome-rest/openapi.yaml (API version 1.719.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: review-suggestions · 4 operations

GET /v1/tenants/{tenant_slug}/projects/{project_ref}/reviews/{review_id}/suggestions​

List a review's suggested changes

Every suggestion on the review, oldest first. Requires projects:view.

Operation id: list_suggestions_v1_tenants__tenant_slug__projects__project_ref__reviews__review_id__suggestions_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
review_idpathstringyesPath parameter identifying the review id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list a review's suggested changes.application/json ReviewSuggestionListResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/reviews/{review_id}/suggestions​

Suggest a change

Propose an RFC 6902 patch to one class or property of the reviewed version.

Open to the review's current-round reviewers, its requester, and project editors.

Operation id: create_suggestion_v1_tenants__tenant_slug__projects__project_ref__reviews__review_id__suggestions_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
review_idpathstringyesPath parameter identifying the review id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for suggest a change.

Responses

StatusDescriptionBody
201Successful response for suggest a change.application/json SuggestionRecord
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/reviews/{review_id}/suggestions/{suggestion_id}/apply​

Apply a suggested change

Merge the suggestion onto the element and write it.

409 suggestion-stale (with conflict_paths) when the element changed since in a way that overlaps the suggestion; it is then recorded stale and nothing else is written. The review's requester or a project editor only, never the suggestion's author.

Operation id: apply_suggestion_v1_tenants__tenant_slug__projects__project_ref__reviews__review_id__suggestions__suggestion_id__apply_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
review_idpathstringyesPath parameter identifying the review id segment.
suggestion_idpathstringyesPath parameter identifying the suggestion id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for apply a suggested change.application/json SuggestionApplyResult
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/reviews/{review_id}/suggestions/{suggestion_id}/reject​

Reject a suggested change

Record a rejection (or its author's withdrawal), with an optional reason.

Operation id: reject_suggestion_v1_tenants__tenant_slug__projects__project_ref__reviews__review_id__suggestions__suggestion_id__reject_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
review_idpathstringyesPath parameter identifying the review id segment.
suggestion_idpathstringyesPath parameter identifying the suggestion id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (optional)

Request body for reject a suggested change.

Responses

StatusDescriptionBody
200Successful response for reject a suggested change.application/json SuggestionRecord
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

ReviewSuggestionListResponse​

A review's suggestions.

PropertyTypeRequiredDescription
suggestionsarray of SuggestionRecordnoOldest first.
can_decidebooleanyesWhether the caller may apply or reject (others') suggestions.

SuggestionApplyResult​

The outcome of applying a suggestion.

PropertyTypeRequiredDescription
suggestionSuggestionRecordyesSuggestion.
elementobjectyesThe element as written.
merged_aroundbooleanyesTrue when the element had other edits since the suggestion, which were kept.

SuggestionCreate​

A reviewer's proposed edit.

PropertyTypeRequiredDescription
target_typeenum "class", "property"yesclass or property.
target_idstringyesThe class or class-property id, in the reviewed version.
patcharray of objectyesRFC 6902 operations (add, remove, replace, test) over the element's canonical JSON — {description, schema} for a class, {description, data} for a property.
notestring or nullnoWhy.

SuggestionDecision​

An optional reason recorded with a rejection.

PropertyTypeRequiredDescription
reasonstring or nullnoReason.

SuggestionRecord​

One stored suggestion.

PropertyTypeRequiredDescription
idstringyesStable resource identifier.
review_idstringyesReview ID.
version_idstringyesProject version identifier or semantic version label, depending on context.
author_idstring or nullnoWho proposed it.
author_namestring or nullnoAuthor Name.
target_typeenum "class", "property"yesTarget Type.
target_idstringyesTarget ID.
target_labelstringyesPet for a class, Pet.name for a property.
notestring or nullnoNote.
baseobjectyesThe element when the suggestion was made.
patcharray of objectyesPatch.
proposedobjectyesbase with patch applied — what the author sees as the diff.
statusenum "open", "applied", "rejected", "stale"yesStatus.
conflict_pathsarray of stringnoWhy it went stale.
stalebooleannoFor an open suggestion: true when the element changed since it was made in a way that overlaps it, so applying would conflict. Always false once decided.
decided_bystring or nullnoDecided By.
decided_by_namestring or nullnoDecided By Name.
decided_atstring (date-time) or nullnoDecided At timestamp (ISO 8601).
reasonstring or nullnoReason.
created_atstring (date-time)yesCreation timestamp (ISO 8601).