BlogBlogCreateResult blog.blog-create-result@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-result.v1.json

blog.blog-create-result@1: the answer of POST /api/v1/blogs on OpenVibe.Blog: { blog, created } — 201 when the blog was created, 200 when the member already had it.

Fields

FieldTypeRequiredDescriptionConstraints
blogblog.blogyes
createdbooleanyes

Examples

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

Valid: created
{
  "blog": {
    "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"
      }
    ]
  },
  "created": true
}
Rejected: no-created
{
  "blog": {
    "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"
      }
    ]
  }
}

Validate

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