{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snitcher/json-schema/snitcher-update-custom-field-request-schema.json",
  "title": "Update Custom Field Request",
  "description": "Request body for updating a custom field definition",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snitcher-openapi.yml#/components/schemas/UpdateCustomFieldRequest",
  "properties": {
    "name": {
      "description": "The human-readable name of the field",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1000
    },
    "visible_in_spotter": {
      "description": "Expose this field's values in the Spotter API response. Omitted or null leaves the current setting unchanged; exposed values become readable on your website by any script that can access the Spotter response.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "field_rules": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "description": "The rule type",
            "type": "string"
          },
          "config": {
            "type": [
              "object",
              "null"
            ]
          }
        },
        "type": "object"
      }
    },
    "options": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "required": [
          "key",
          "label"
        ],
        "properties": {
          "key": {
            "type": "string",
            "maxLength": 255
          },
          "label": {
            "type": "string",
            "maxLength": 255
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 50
          }
        },
        "type": "object"
      }
    }
  },
  "type": "object"
}