{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amberai/json-schema/amberai-custom-field-definitions-schema.json",
  "title": "CustomFieldDefinitions",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amberai-custom-field-definitions-api-openapi.yml#/components/schemas/CustomFieldDefinitions",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
    },
    "entityType": {
      "type": "string"
    },
    "entityField": {
      "type": "string"
    },
    "fieldKey": {
      "type": "string"
    },
    "fieldType": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "required": {
      "type": "boolean"
    },
    "defaultValue": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "selectValues": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema1"
      }
    },
    "isActive": {
      "type": "boolean"
    },
    "sequence": {
      "type": "number"
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "entityType",
    "entityField",
    "fieldKey",
    "fieldType",
    "label",
    "description",
    "required",
    "defaultValue",
    "selectValues",
    "isActive",
    "sequence",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    },
    "__schema1": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema1"
          }
        }
      ]
    }
  }
}