CTZN.network Schemas Video Devlog

Reaction json-table

ctzn.network/reaction

A user reaction on a piece of content

{
  "id": "ctzn.network/reaction",
  "title": "Reaction",
  "description": "A user reaction on a piece of content",
  "type": "json-table",
  "keyTemplate": [
    {
      "type": "json-pointer",
      "value": "/reaction"
    },
    {
      "type": "string",
      "value": ":"
    },
    {
      "type": "json-pointer",
      "value": "/subject/dbUrl"
    }
  ],
  "definition": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "required": [
      "subject",
      "reaction",
      "createdAt"
    ],
    "properties": {
      "subject": {
        "type": "object",
        "required": [
          "dbUrl",
          "authorId"
        ],
        "properties": {
          "dbUrl": {
            "type": "string",
            "format": "uri"
          },
          "authorId": {
            "type": "string",
            "pattern": ".+@.+"
          }
        }
      },
      "reaction": {
        "type": "string",
        "minLength": 1,
        "maxLength": 16
      },
      "createdAt": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}

Schemas