{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commentary-dev/json-schema/commentary-dev-form-record-schema.json",
  "title": "FormRecord",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commentary-dev-forms-api-openapi.yml#/components/schemas/FormRecord",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "referenceId": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ]
    },
    "visibility": {
      "type": "string",
      "enum": [
        "private",
        "shared",
        "public_placeholder"
      ]
    },
    "sourceType": {
      "type": "string",
      "enum": [
        "commentary",
        "github",
        "embedded",
        "custom"
      ]
    },
    "contractHash": {
      "type": "string"
    },
    "currentVersionId": {
      "type": [
        "string",
        "null"
      ]
    },
    "sourceMetadata": {
      "type": "object",
      "additionalProperties": true
    },
    "destinationConfig": {
      "type": "object",
      "additionalProperties": true
    },
    "contract": {
      "$ref": "#/$defs/FormContract"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "FormContract": {
      "type": "object",
      "description": "Normalized Commentary Form Contract v1.",
      "additionalProperties": true
    }
  }
}