SearchDocumentWriteRequest search.document-write-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- search
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/search/document-write-request.v1.json
search.document-write-request@1: the request of search.document.write on OpenVibe.Search (a service writes and reads only the documents it owns). PUT /api/v1/documents/:owner/:type/:id: a search.index-document@1 (owner, type and id come from the path; a body that names others is 422). DELETE /api/v1/documents/:owner/:type/:id?revision= (a tombstone) and the owner reads (GET /api/v1/owners/:owner/documents, …/documents/:type/:id, …/rejections) take no body.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: delete
{}Valid: upsert
{
"owner": "wiki",
"type": "page",
"id": "pg_01J0000000000000000000000Z",
"revision": 3,
"visibility": "public",
"canonical_url": "https://openvibe.wiki/w/example",
"title": "Example page",
"summary": "A short summary.",
"body": "Plain text body.",
"facets": {
"space": "general",
"tags": [
"example"
]
},
"language": "en",
"authorship": "human",
"publication_state": "published",
"published_at": "2026-09-22T12:00:00Z",
"indexability": {
"decision": "index",
"reasons": []
},
"provenance": [
{
"service": "sources",
"type": "item",
"id": "itm_01J0000000000000000000000Z"
}
]
}Rejected: bad-document
{
"owner": "Wiki!",
"type": "page",
"id": "x",
"revision": -1
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('search.document-write-request@1', value); // { valid, errors: [{ path, message }] }