WikiSpaceWriteRequest wiki.space-write-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/space-write-request.v1.json
wiki.space-write-request@1: bodies of wiki.space.create on OpenVibe.Wiki. POST /api/v1/spaces: { name, slug?, description?, kind?, visibility? } (the slug defaults from the name: 2-63 lowercase letters, digits and dashes; kind official is for staff; visibility public, members or private). PATCH /api/v1/spaces/:space: { name?, description?, visibility?, slug? } (an owner; a retired slug keeps leading to its old space). PUT /api/v1/spaces/:space/roles/:subject: { role: owner | editor | viewer | null } (an owner; null removes; a user space keeps at least one owner).
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: create
{
"name": "Garage builds",
"description": "What we build on weekends.",
"visibility": "members"
}Valid: role
{
"role": "editor"
}Rejected: bad-role
{
"role": "admin",
"visibility": "secret"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('wiki.space-write-request@1', value); // { valid, errors: [{ path, message }] }