CommunityForumPost community.forum-post@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- community
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/community/forum-post.v1.json
community.forum-post@1: one forum post (the opening post of a thread or a reply) as OpenVibe.Community's API shows it (server/forum/service.js shapePost). A deleted post keeps its place with no author, body, attachments or pastes.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | integer | yes | ||
thread_id | integer | yes | ||
is_opening | boolean | yes | ||
origin | string | yes | ||
author | object | null | yes | The author projection: a person (subject and Network profile), OpenVibe AI (is_ai) or the system (is_system); null when unknown or deleted. | |
body_markdown | string | null | yes | ||
body_html | string | null | yes | ||
revision | integer | yes |
| |
deleted | boolean | yes | ||
created_at | string | null |
| ||
updated_at | string | null |
| ||
can_edit | boolean | yes | ||
attachments | array of object | yes |
| |
attachments[].media_id | string | yes | ||
attachments[].url | string | yes | ||
attachments[].filename | string | null | |||
attachments[].mime | string | |||
attachments[].size_bytes | integer | |||
pastes | array of object | yes |
| |
pastes[].slug | string | yes | ||
pastes[].title | string | |||
pastes[].language | string | |||
pastes[].type | string | |||
pastes[].url | string | yes | ||
pastes[].screenshot_url | string | null | |||
pastes[].lines | integer | |||
pastes[].excerpt | string | null |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: opening
{
"attachments": [],
"pastes": [
{
"slug": "k3JfQ2",
"title": "ffmpeg restream flags",
"language": "text",
"type": "paste",
"url": "/p/k3JfQ2",
"screenshot_url": null,
"lines": 1,
"excerpt": "ffmpeg -re -i in.flv -c copy -f flv rtmp://example/live"
}
],
"id": 5120,
"thread_id": 311,
"is_opening": true,
"origin": "user",
"author": {
"subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"username": "alice",
"display_name": "Alice",
"avatar_url": null,
"profile_color": "#3b82f6"
},
"body_markdown": "What bitrates do you use?",
"body_html": "<p>What bitrates do you use?</p>",
"revision": 1,
"deleted": false,
"created_at": "2026-09-25T18:00:00.000Z",
"updated_at": "2026-09-25T18:00:00.000Z",
"can_edit": true
}Rejected: revision-zero
{
"id": 1,
"thread_id": 1,
"is_opening": false,
"origin": "user",
"author": null,
"body_markdown": null,
"body_html": null,
"revision": 0,
"deleted": true,
"can_edit": false,
"attachments": [],
"pastes": []
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('community.forum-post@1', value); // { valid, errors: [{ path, message }] }