{
  "id": "code.json",
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "Code",
  "description": "A source code snippet",
  "type": [
    "object"
  ],
  "properties": {
    "type": {
      "description": "Block type",
      "example": "video",
      "type": "string",
      "enum": [
        "code"
      ]
    },
    "html": {
      "description": "HTML content of the block",
      "example": "<pre><code>one\ntwo</code></pre>",
      "type": "string",
      "minLength": 7
    },
    "text": {
      "description": "Extracted text",
      "example": "var foo = 42;",
      "type": "string"
    },
    "length": {
      "description": "Length of extracted text",
      "example": 13,
      "type": "integer"
    },
    "programming_language": {
      "description": "Detected programming language",
      "example": "javascript",
      "type": "string"
    }
  },
  "required": [
    "type",
    "html"
  ]
}