{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snitcher/json-schema/snitcher-custom-field-schema.json",
  "title": "Custom Field",
  "description": "A custom field definition for organisations",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snitcher-openapi.yml#/components/schemas/CustomField",
  "properties": {
    "identifier": {
      "description": "The unique identifier of the field",
      "type": "string"
    },
    "key": {
      "description": "The machine-readable key of the field",
      "type": "string"
    },
    "name": {
      "description": "The human-readable name of the field",
      "type": "string"
    },
    "entity_type": {
      "description": "The entity type the field belongs to",
      "type": "string"
    },
    "type": {
      "description": "The data type of the field",
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "group": {
      "description": "The group the field belongs to",
      "type": "string"
    },
    "is_visible": {
      "type": "boolean"
    },
    "source": {
      "description": "The source of the field",
      "type": "string"
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "is_system": {
      "type": "boolean"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "visible_in_spotter": {
      "description": "Whether this field's values are exposed in the Spotter API response",
      "type": "boolean"
    }
  },
  "type": "object"
}