{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/devarmor/json-schema/devarmor-document-create-schema.json",
  "title": "DocumentCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/devarmor-documents-api-openapi.yml#/components/schemas/DocumentCreate",
  "properties": {
    "symbolic_name": {
      "type": "null",
      "title": "Symbolic Name"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Text"
    },
    "topics": {
      "items": {
        "type": "string",
        "pattern": "^[0-9a-z-]+$"
      },
      "type": "array",
      "title": "Topics"
    },
    "source_platform": {
      "anyOf": [
        {
          "$ref": "#/$defs/DocumentPlatform"
        },
        {
          "type": "null"
        }
      ]
    },
    "source_view_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source View Url"
    },
    "source_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Id"
    },
    "mime_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Mime Type"
    },
    "blob_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Blob Id"
    },
    "threat_model_version": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d+(\\.\\d+)*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Threat Model Version"
    },
    "threat_model_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Threat Model Id"
    },
    "design_review_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Design Review Id"
    }
  },
  "type": "object",
  "required": [
    "title"
  ],
  "$defs": {
    "DocumentPlatform": {
      "type": "string",
      "enum": [
        "atlassian",
        "atlassian_jira",
        "atlassian_confluence",
        "google",
        "github_wiki"
      ],
      "title": "DocumentPlatform"
    }
  }
}