{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "/schemas/template-record-v1.json",
  "title": "Tarvos Template Record v1",
  "type": "object",
  "required": [
    "$schema",
    "schemaVersion",
    "canonicalUrl",
    "slug",
    "name",
    "description",
    "lifecycle",
    "version",
    "updatedAt",
    "workflow",
    "requiredNodes",
    "formats"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "schemaVersion": {
      "const": 1
    },
    "canonicalUrl": {
      "type": "string",
      "format": "uri"
    },
    "slug": {
      "type": "string",
      "minLength": 1
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "lifecycle": {
      "enum": [
        "documented",
        "installable",
        "validated",
        "stable"
      ]
    },
    "version": {
      "type": "string",
      "minLength": 1
    },
    "updatedAt": {
      "type": "string",
      "format": "date"
    },
    "workflow": {
      "type": "object",
      "required": [
        "environment",
        "mediaType",
        "rawUrl"
      ]
    },
    "requiredNodes": {
      "type": "object",
      "required": [
        "total",
        "tarvos",
        "items"
      ]
    },
    "formats": {
      "type": "object",
      "required": [
        "html",
        "json",
        "markdown",
        "rawWorkflow"
      ]
    }
  }
}