{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/standards-new/json-schema/standards-new-add-attribute-input-schema.json",
  "title": "AddAttributeInput",
  "description": "Definition of a new attribute. Type-specific configuration (e.g. options for select, decimals for number, target object for relation) is passed as additional top-level keys.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/standards-new-openapi.json#/components/schemas/AddAttributeInput",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "name": {
      "type": "string",
      "description": "Unique machine name within the object."
    },
    "label": {
      "type": "string",
      "description": "Human-readable label."
    },
    "type": {
      "type": "string",
      "enum": [
        "text",
        "richtext",
        "number",
        "checkbox",
        "date",
        "phone",
        "currency",
        "status",
        "location",
        "select",
        "multiselect",
        "file",
        "user",
        "relation",
        "formula",
        "rollup",
        "document"
      ],
      "description": "Attribute type."
    },
    "required": {
      "type": "boolean"
    },
    "unique": {
      "type": "boolean"
    },
    "description": {
      "type": "string"
    },
    "placeholder": {
      "type": "string"
    },
    "icon": {
      "type": "string",
      "description": "Icon name."
    },
    "defaultValue": {
      "description": "Default value; the shape depends on the attribute type."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "name",
    "label",
    "type"
  ]
}