{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-update-custom-field-request-schema.json",
  "title": "UpdateCustomFieldRequest",
  "description": "Request body for updating a custom field. At least one field must be provided. `type` is immutable and cannot be updated.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-custom-fields-beta-api-openapi.yml#/components/schemas/UpdateCustomFieldRequest",
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "title": "Label",
      "description": "New display name for the field."
    },
    "hasFixedOptions": {
      "type": "boolean",
      "title": "Has Fixed Options",
      "description": "Whether values are constrained to `allowedValues`. Must stay consistent with `allowedValues`."
    },
    "allowedValues": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "title": "Allowed Values",
      "description": "The permitted values. Must be non-empty when `hasFixedOptions` is true and empty otherwise."
    },
    "displayAs": {
      "type": "string",
      "enum": [
        "DATE",
        "AGE"
      ],
      "title": "Display As",
      "description": "How the value is displayed. `AGE` is only valid on a `DATE` field. Omit to leave unchanged."
    }
  },
  "additionalProperties": false
}