Skip to main content

Reviews and the approval gate

Route/ade/reviews/[id]

A review asks named reviewers to approve a draft version before it is published. A style guide's approval gate can make that mandatory: publishing is refused until the current review round has enough approvals.

Review of v2.4.0, round 2: the classified changes, the reviewers with one approval and one pending, and the decision barReview of v2.4.0, round 2: the classified changes, the reviewers with one approval and one pending, and the decision bar
Route/ade/reviews/[id]

Turn on the approval gate​

The gate is part of a style guide's Policy, so it applies to every project scored by that guide.

  1. Go to Govern → Style guides, open the guide and choose the Policy tab.
  2. Set Required approvals — how many approvals a draft needs, for example 2. Zero turns the gate off.
  3. Optionally choose a Required reviewer role that at least one approval must come from.
  4. Click “Save”.

Over the REST API, the same settings are PUT /v1/style-guides/{tenant}/{guide}/policy:

PUT /v1/style-guides/{tenant}/{guide}/policy
X-API-Key: <your-api-key>

{ "requiredApprovals": 2, "requiredReviewerRole": "<role-slug>" }
  • requiredApprovals — how many approvals a draft needs, for example 2. Zero turns the gate off.
  • requiredReviewerRole — optional: a role slug at least one approval must come from. Send null for any approver. Workspace administrators count as Owner.

Request a review​

A review is requested over the REST API, or by opening a merge request for a draft branch, which asks its reviewers to review the branch. Only a draft version can be reviewed, it can have one open review at a time, and you cannot review your own version:

POST /v1/tenants/{tenant}/projects/{project}/reviews
X-API-Key: <your-api-key>

{ "version": "2.4.0", "reviewers": ["<user-id>", "<user-id>"] }

Each reviewer is notified (Priya Raman requested your review) and sees it under Needs attention on Home. The version then carries an In review pill on Versions and Projects that opens the review.

Review a version​

Open the review from the notification, the pill or Home. The header reads Review of v2.4.0 with its state and a tally — Requested by Priya Raman · Round 2 · 1 of 2 approved · 1 pending.

  • Changes — what changed since the newest published version, grouped as Breaking, Non-breaking and Docs-only. Plain diff switches to a line diff of the two documents; when they are the same it says Identical documents instead.
  • Suggestions — concrete edits reviewers propose; see Suggested changes.
  • Spec — the whole document, as JSON or YAML. It is the same document View spec shows on Versions, private operations included.
  • Discussion — the version's comment threads.
  • Reviewers — each reviewer's decision and note, this round and earlier ones.

Then decide:

  1. Optionally type a Note — it is required to request changes.
  2. Click “Approve” or “Request changes”.
After approving: Approved, 2 of 2 approved, and the decision bar saying You approved this roundAfter approving: Approved, 2 of 2 approved, and the decision bar saying You approved this round
Route/ade/reviews/[id]

A decision cannot be changed. The requester is notified (Marcus approved your review).

StateMeans
In reviewWaiting for decisions.
ApprovedEvery reviewer in the round approved.
Changes requestedAt least one reviewer requested changes; the round is decided.
WithdrawnThe requester or an administrator withdrew it; its decisions stay on record.

Address changes and re-request​

If changes are requested — or the version changes after the round was requested, which makes its approvals stale — fix the version, then start a new round:

POST /v1/tenants/{tenant}/projects/{project}/reviews/{review_id}/re-request

Approvals from earlier rounds do not carry over. …/withdraw withdraws the review.

Suggested changes​

A prose note makes the author work out what you meant and type it in again. When you know exactly what should change, suggest it. The author applies it in one click.

Suggest a change (you are a reviewer, the requester, or an editor of the project):

  1. Open the review and click the “Suggestions” tab.
  2. Under Suggest a change, choose the Element, a class such as Pet or a property such as Pet.name.
  3. Choose the Field, for example maxLength, format, enum or description. New value shows its current value.
  4. Type the new value, for example 100. Numbers, true/false, lists such as ["cat", "dog"] and objects are read as JSON, and anything else as text. Leave it empty to remove the field.
  5. Optionally say Why, then click “Suggest”.

Apply or reject (you requested the review, or you can edit the project). Each suggestion shows the element before and after as a diff:

  • Click “Apply” to write the change to the version. Edits other people have made elsewhere in the element since are kept.
  • Click “Reject” to decline it. The rejection is recorded with your name.
  • The reviewer who made a suggestion can't apply it, but can click “Withdraw”.
StateMeans
OpenWaiting for the author.
AppliedThe change was written to the version.
RejectedThe author declined it, or its reviewer withdrew it.
StaleThe same field changed after the suggestion was made, or the element was deleted. Apply is off and the suggestion names what changed. Suggest it again against the current version.

Suggestions cover classes and properties. Paths and operations are not supported yet.

Publish through the gate​

The Publish dialog on Versions shows a Review card with the round's state; it never disables Publish itself.

The publish dialog's Review card: changes requested, and the note that the workspace refuses this publishThe publish dialog's Review card: changes requested, and the note that the workspace refuses this publish
Route/ade/dashboard/versions

When the gate is not met, publishing is refused with the reason, for example:

  • This version has no open review, and 2 approval(s) are required before it can be published.
  • 1 of 2 required approval(s) recorded on this version.
  • None of the 2 approval(s) came from a reviewer with the 'release-manager' role, which this project's approval policy requires.

Collect the approvals, relax the policy, or — as a last resort — tick Force publish (ignore validation errors) and give a Force publish reason, which is recorded in the audit trail.

Component library approvals​

The same policy governs the Designer's shared component library: reusable parameters, headers, request bodies, responses and security bundles that many projects pin. Two more settings sit beside the approval gate, on the style guide's Policy tab under Component library, or over the API:

PUT /v1/style-guides/{tenant}/{guide}/policy
X-API-Key: <your-api-key>

{
"componentApprovalStages": [
{ "name": "Platform review", "requiredApprovals": 2 },
{ "name": "Security", "requiredApprovals": 1, "requiredReviewerRole": "<role-slug>" }
],
"componentDeprecationNoticeDays": 30
}
  • componentApprovalStages — up to five stages, in order. A component revision is published only when every stage has its approvals; a stage takes decisions only once the stages before it are satisfied. Editing a draft revision makes the approvals it had stale. Send [] to turn the component gate off.
  • componentDeprecationNoticeDays — the least notice, in days, a component deprecation must give before its sunset. Zero allows any future date.

The component library itself — approving, deprecating and upgrading components — is described in the Apiome Suite documentation.

With the API​

GET / POST /v1/tenants/{tenant}/projects/{project}/reviews, GET …/reviews/{id}, POST …/reviews/{id}/decision (approve or request_changes, with an optional note), …/re-request, …/withdraw, and GET …/versions/{version}/review. Suggested changes are GET / POST …/reviews/{id}/suggestions (a JSON patch over the element) and POST …/suggestions/{suggestion_id}/apply / …/reject; a stale apply answers 409 suggestion-stale with conflict_paths. Review events are in the workflow audit, GET /v1/tenants/{tenant}/workflow-audit?version_id=…. See the API reference. There is no CLI command for reviews.

Where next​