{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commentary-dev/json-schema/commentary-dev-form-contract-request-schema.json",
  "title": "FormContractRequest",
  "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/FormContractRequest",
  "type": "object",
  "properties": {
    "contract": {
      "$ref": "#/$defs/FormContract"
    },
    "contractSource": {
      "type": "string",
      "description": "Literal JSON or YAML form contract source."
    },
    "sourceFormat": {
      "type": "string",
      "enum": [
        "json",
        "yaml",
        "auto"
      ]
    },
    "referenceId": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "visibility": {
      "type": "string",
      "enum": [
        "private",
        "shared",
        "public_placeholder"
      ]
    },
    "sourceType": {
      "type": "string",
      "enum": [
        "commentary",
        "github",
        "embedded",
        "custom"
      ]
    },
    "sourceMetadata": {
      "type": "object",
      "additionalProperties": true
    },
    "destinationConfig": {
      "type": "object",
      "additionalProperties": true
    },
    "agentAlias": {
      "type": "string"
    },
    "clientName": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "FormContract": {
      "type": "object",
      "description": "Normalized Commentary Form Contract v1.",
      "additionalProperties": true
    }
  }
}