{
  "description": "Defines the schema for Version.",
  "type": "object",
  "properties": {
    "libraryId": {
      "description": "The identifier of the Library that Version belongs to",
      "minLength": 3,
      "maxLength": 64,
      "type": "string"
    },
    "id": {
      "description": "The reference identifer of the Version",
      "minLength": 3,
      "maxLength": 64,
      "type": "string"
    },
    "componentId": {
      "description": "The identifier of the Component that Version belongs to",
      "minLength": 3,
      "maxLength": 64,
      "type": "string"
    },
    "name": {
      "description": "The name of the Version.",
      "minLength": 1,
      "maxLength": 128,
      "type": "string"
    },
    "description": {
      "description": "Textual description of the Version.",
      "type": "string"
    },
    "status": {
      "description": "The status of the Version",
      "enum": [
        "draft",
        "published",
        "saved",
        "staged"
      ],
      "type": "string"
    },
    "orderIdx": {
      "description": "The order index of the Version.",
      "minLength": 1,
      "maxLength": 64,
      "type": "string"
    },
    "revision": {
      "description": "The numerc revision of the Version.",
      "minimum": 0,
      "type": "integer"
    },
    "model": {
      "description": "The model presentation of the Version",
      "type": "string"
    },
    "view": {
      "description": "The view presentation of the Version.",
      "minLength": 1,
      "type": "string"
    },
    "diff": {
      "description": "The difference between current and previous version of the Version",
      "type": "object",
      "properties": {},
      "additionalProperties": true
    },
    "breakpointIds": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "description": "List of ids of applicable breakpoints. Null if all breakpoints are applicable.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "datasourceIds": {
      "description": "The identifiers of the datasources for this Version.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "isEmbeddable": {
      "description": "Allow version to be embeddable on its own, not as a part of responsive bundle",
      "type": "boolean"
    },
    "forkOriginId": {
      "anyOf": [
        {
          "description": "Id of a version that was used as a base for the fork.",
          "minLength": 3,
          "maxLength": 64,
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "forkOriginRevision": {
      "anyOf": [
        {
          "description": "Revision of a version that was used as a base for the fork.",
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "forkedAt": {
      "anyOf": [
        {
          "description": "Time when the version was first forked.",
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "classList": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "description": "Array of extra css classes applied to the version.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "createdAt": {
      "description": "The timestamp when the Version was created at",
      "type": "string",
      "format": "date-time"
    },
    "deletedAt": {
      "anyOf": [
        {
          "description": "The timestamp when the Version was deleted at.",
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "modifiedAt": {
      "description": "The timestamp when the Version was last modified at",
      "type": "string",
      "format": "date-time"
    },
    "modifiedBy": {
      "description": "The User who last modified the Version",
      "type": "object",
      "properties": {},
      "additionalProperties": true
    }
  },
  "additionalProperties": false,
  "required": [
    "componentId",
    "id",
    "libraryId",
    "name",
    "revision",
    "status",
    "view"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}