{
  "$schema" : "https://json-schema.org/draft/2019-09/schema",
  "$defs" : {
    "CustomField" : {
      "type" : "object",
      "properties" : {
        "Category" : {
          "type" : "string"
        },
        "Description" : {
          "type" : "string"
        },
        "Hidden" : {
          "type" : "boolean",
          "description" : "Controls whether this field should be visible to end users: e.g. in the Portal or in statistics."
        },
        "Label" : {
          "type" : "string"
        },
        "Type" : {
          "$ref" : "#/$defs/CustomFieldType"
        }
      },
      "additionalProperties" : {
        "type" : "string"
      }
    },
    "CustomFieldType" : {
      "type" : "string",
      "enum" : [ "STRING", "TEXT", "NUMBER", "TIMESTAMP" ]
    },
    "CustomFields" : {
      "type" : "object",
      "properties" : {
        "Cases" : {
          "$ref" : "#/$defs/Map(String,CustomFieldSchema)"
        },
        "Starts" : {
          "$ref" : "#/$defs/Map(String,CustomFieldSchema)"
        },
        "Tasks" : {
          "$ref" : "#/$defs/Map(String,CustomFieldSchema)"
        }
      },
      "additionalProperties" : false
    },
    "Map(String,CustomFieldSchema)" : {
      "type" : "object",
      "additionalProperties" : {
        "$ref" : "#/$defs/CustomField"
      }
    }
  },
  "type" : "object",
  "properties" : {
    "CustomFields" : {
      "$ref" : "#/$defs/CustomFields"
    }
  },
  "additionalProperties" : false
}
