{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/majr-app/json-schema/majr-app-draft-request-schema.json",
  "title": "DraftRequest",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dispatch-openapi.json#/components/schemas/DraftRequest",
  "properties": {
    "changes": {
      "type": "string",
      "maxLength": 100000,
      "minLength": 1,
      "title": "Changes",
      "description": "Free text: commit subjects + merged PR titles"
    },
    "product": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Product",
      "description": "One-line 'Name: what it does'"
    },
    "voice": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000
        },
        {
          "type": "null"
        }
      ],
      "title": "Voice",
      "description": "Persona/tone guidance. Your account's brand-voice floor is composed beneath this server-side — you style on top of the floor, you can't replace it."
    },
    "model": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128
        },
        {
          "type": "null"
        }
      ],
      "title": "Model",
      "description": "Optional model override; must be in the service allowlist, else 400"
    },
    "render_target": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "embedded_fragment",
            "standalone_document"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Render Target",
      "description": "Consuming surface's relationship to document structure. 'embedded_fragment' (default): the caller owns the page chrome, so the body carries no headings (e.g. Goblin's /whats-new). 'standalone_document': the notes are the whole document and may use section headings (e.g. Dossier's Sparkle updater, a GitHub release)."
    }
  },
  "type": "object",
  "required": [
    "changes"
  ]
}