ReviewsCorrectionSubmitRequest reviews.correction-submit-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- reviews
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/reviews/correction-submit-request.v1.json
reviews.correction-submit-request@1: the body of reviews.correction.submit on OpenVibe.Reviews: POST /api/v1/entities/:ref/corrections { body, target_type?, target_id?, evidence_url? } sends a correction to the editors' queue for the person named in X-OV-Subject (a signed-in person: 403 reviews.person_required). Refusals: 422 correction.invalid (unknown target_type, body under 10 or over 4000 characters, evidence_url not http(s)), 409 correction.duplicate (the same open request again), 429 correction.rate_limited (20 a day per person), 404 entity.not_found, 410 entity.deleted.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
body | string | yes | What is wrong, 10–4000 characters once trimmed. |
|
target_type | enum | Default entity. |
| |
target_id | string | null | Cut to 100 characters. | ||
evidence_url | string | null | An http(s) URL. |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: correction
{
"target_type": "aggregate",
"body": "The rating count looks doubled: Sound Lab lists 159 ratings.",
"evidence_url": "https://soundlab.example/lumen-x2"
}Rejected: too-short
{
"body": "wrong"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('reviews.correction-submit-request@1', value); // { valid, errors: [{ path, message }] }