WikiRevertRequest wiki.revert-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- wiki
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/wiki/revert-request.v1.json
wiki.revert-request@1: the body of POST /api/v1/pages/:id/revert on OpenVibe.Wiki (wiki.revision.revert, editors): a new revision with the content of to_revision; expected_revision is the head you saw (a stale one is refused); publish republishes when the page was published.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
to_revision | integer | yes |
| |
expected_revision | integer |
| ||
message | string | null | |||
publish | boolean | null |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: revert
{
"to_revision": 2,
"expected_revision": 3,
"message": "revert vandalism",
"publish": true
}Rejected: no-target
{
"expected_revision": 3
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('wiki.revert-request@1', value); // { valid, errors: [{ path, message }] }