{
    "id": "http://schemas.triniti.io/json-schema/triniti/canvas/mixin/image-block/1-0-0.json#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "etag": {
            "type": "string",
            "pattern": "^[\\w\\.:-]+$",
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "css_class": {
            "type": "string",
            "pattern": "^[\\w\\s-]+$",
            "description": "In rendering environments that support HTML the css_class can be appended to the dom elements' class attribute.",
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "updated_date": {
            "type": "string",
            "format": "date-time",
            "description": "Represents an update that occurred on the node this block is attached to. DOES NOT indicate an update to the block itself. eg an article with a twitter block with updated_date means that the article was updated to include that twitter block.",
            "pbj": {
                "type": "date-time",
                "rule": "single"
            }
        },
        "aside": {
            "type": "boolean",
            "description": "When true it means this block represents a portion of a document whose content is only indirectly related to the document's main content. Asides are frequently presented as sidebars or call-out boxes.",
            "pbj": {
                "type": "boolean",
                "rule": "single"
            }
        },
        "node_ref": {
            "type": "string",
            "pattern": "^[\\w\\/\\.:-]+$",
            "pbj": {
                "type": "identifier",
                "rule": "single"
            }
        },
        "title": {
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "description": "An optional override for the title of the node.",
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "caption": {
            "type": "string",
            "minLength": 0,
            "maxLength": 5000,
            "pbj": {
                "type": "text",
                "rule": "single"
            }
        },
        "is_nsfw": {
            "type": "boolean",
            "pbj": {
                "type": "boolean",
                "rule": "single"
            }
        },
        "url": {
            "type": "string",
            "pattern": "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$",
            "pbj": {
                "type": "text",
                "rule": "single",
                "format": "url"
            }
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "unknown",
                "auto",
                "1by1",
                "2by3",
                "3by2",
                "3by4",
                "4by3",
                "4by5",
                "5by4",
                "9by16",
                "16by9",
                "original",
                "custom"
            ],
            "pbj": {
                "type": "string-enum",
                "rule": "single"
            }
        },
        "fallback_src_url": {
            "type": "string",
            "pattern": "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$",
            "description": "For imported image blocks it may be necessary to store the old URL.",
            "pbj": {
                "type": "text",
                "rule": "single",
                "format": "url"
            }
        }
    },
    "required": [
        "node_ref"
    ],
    "additionalProperties": true
}