BlogBlog blog.blog@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- blog
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/blog/blog.v1.json
blog.blog@1: one blog as OpenVibe.Blog's API shows it (server/http/api.js blogDto). Members of the blog (and staff) also see status, owner_subject and feed_settings.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes | ||
kind | string | yes | member, … | |
handle | string | yes | ||
title | string | yes | ||
description | string | null | |||
url | string | yes | ||
theme | string | yes | ||
language | string | yes | ||
feeds | array of object | yes | ||
feeds[].type | enum | yes |
| |
feeds[].url | string | yes | ||
status | string | |||
owner_subject | string | null | |||
feed_settings | object | |||
feed_settings.rss | integer | |||
feed_settings.atom | integer | |||
feed_settings.json | integer | |||
feed_settings.item_count | integer |
| ||
feed_settings.full_content | integer |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: member
{
"id": "blg_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"kind": "member",
"handle": "alice",
"title": "Alice builds things",
"description": "Garage projects and stream tech.",
"url": "https://openvibe.blog/@alice",
"theme": "paper",
"language": "en",
"feeds": [
{
"type": "rss",
"url": "https://openvibe.blog/@alice/feed.xml"
},
{
"type": "json",
"url": "https://openvibe.blog/@alice/feed.json"
}
]
}Rejected: bad-feed-type
{
"id": "b",
"kind": "member",
"handle": "x",
"title": "t",
"url": "u",
"theme": "paper",
"language": "en",
"feeds": [
{
"type": "opml",
"url": "u"
}
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('blog.blog@1', value); // { valid, errors: [{ path, message }] }