BlogBlogCreateRequest blog.blog-create-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-create-request.v1.json

blog.blog-create-request@1: the body of POST /api/v1/blogs on OpenVibe.Blog (blog.blog.create): get or create the acting member's blog (one per usr_ subject). handle defaults to their Network username (2-40 of a-z, 0-9, _ and -, not a reserved word); title and description are optional.

Fields

FieldTypeRequiredDescriptionConstraints
handlestring
  • pattern ^[a-z0-9_-]{2,40}$
titlestring | null
descriptionstring | null

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: title
{
  "title": "Alice builds things"
}
Rejected: bad-handle
{
  "handle": "A"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('blog.blog-create-request@1', value);   // { valid, errors: [{ path, message }] }