BlogBlogConfigureRequest blog.blog-configure-request@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-configure-request.v1.json
blog.blog-configure-request@1: the body of PATCH /api/v1/blogs/:handle on OpenVibe.Blog (blog.blog.configure; an owner): title (at most 120 characters, not blank), description (500), language (a BCP 47 tag) and feeds { rss, atom, json, item_count (1-50), full_content }. Fields left out keep their value.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
title | string | null | |||
description | string | null | |||
language | string | null |
| ||
feeds | object | |||
feeds.rss | boolean | integer | string | |||
feeds.atom | boolean | integer | string | |||
feeds.json | boolean | integer | string | |||
feeds.item_count | integer | string |
| ||
feeds.full_content | boolean | integer | string |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: configure
{
"description": "Garage projects, stream tech and the odd recipe.",
"language": "en-GB",
"feeds": {
"rss": true,
"atom": false,
"item_count": 30
}
}Rejected: bad-language
{
"language": "English"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('blog.blog-configure-request@1', value); // { valid, errors: [{ path, message }] }