{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commareports-com/json-schema/commareports-com-revision-with-html-schema.json",
  "title": "RevisionWithHtml",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commareports-com-revisions-api-openapi.yml#/components/schemas/RevisionWithHtml",
  "allOf": [
    {
      "$ref": "#/$defs/Revision"
    },
    {
      "type": "object",
      "properties": {
        "report_id": {
          "type": "string",
          "format": "uuid"
        },
        "html": {
          "type": "string"
        }
      },
      "required": [
        "report_id",
        "html"
      ]
    }
  ],
  "$defs": {
    "Revision": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "parent_revision_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "content_hash": {
          "type": "string"
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "created_via": {
          "type": [
            "string",
            "null"
          ],
          "description": "e.g. 'api', 'editor', 'routine'."
        }
      },
      "required": [
        "id",
        "content_hash",
        "created_at"
      ]
    }
  }
}