{
  "title": "type",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "description": "Contains information about an attribute field.",
  "properties": {
    "domains": {
      "type": "object",
      "description": "A comma-delimited series of domain objects for each domain in the type.",
      "patternProperties": {
        ".*": {
          "type": "object",
          "$ref": "domain_schema.json"
        }
      }
    },
    "id": {
      "type": [
        "number",
        "string"
      ],
      "description": "A unique string or numerical ID for the type."
    },
    "name": {
      "type": "string",
      "description": "A user-friendly name for the type."
    },
    "templates": {
      "type": "array",
      "description": "Defined as a property of the layer definition when there are no types defined; otherwise, templates are defined as properties of the types.",
      "items": {
        "type": "object",
        "$ref": "template_schema.json"
      },
      "uniqueItems": true
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false,
  "esriDocumentation": {
    "examples": [
      {
        "title": "types",
        "code": {
          "types": {
            "id": "1",
            "name": "Active",
            "domains": {
              "status": {
                "type": "inherited"
              },
              "hazardous_issue": {
                "type": "inherited"
              },
              "severity": {
                "type": "inherited"
              }
            },
            "templates": [
              {
                "name": "Active",
                "description": "",
                "prototype": {
                  "attributes": {
                    "occurence_local": null,
                    "date_resolved": null,
                    "issue_id": null,
                    "issue_name": null,
                    "empname_reporting": null,
                    "emp_id": null,
                    "job_title": null,
                    "hazard_date": null,
                    "status": "1",
                    "hazardous_issue": null,
                    "severity": null,
                    "number_injuries": null,
                    "comments_injuries": null,
                    "comments_hazard": null,
                    "issued_resolved": null,
                    "comments_resolve": null
                  }
                },
                "drawingTool": "esriFeatureEditToolPoint"
              }
            ]
          }
        }
      }
    ]
  }
}
