{
	"$schema": "http://json-schema.org/draft-03/schema#",
	"title": "Departmental Distribution Schema",
	"description": "A schema for retrieving a departmental distribution.",
	"type": "object",
	"restdocs": "http://restdocs.e-conomic.com/#get-departmental-distributions-departments-deparmentaldistributionnumber",
	"properties": {
		"departmentalDistributionNumber": {
			"type": "integer",
			"description": "A unique numeric identifier for the departmental distribution."
		},
		"name": {
			"type": "string",
			"maxLength": 250,
			"description": "A descriptive name of the departmental distribution."
		},
		"barred": {
			"type": "boolean",
			"description": "Property indicating whether the departmental distribution is barred from being used."
		},
		"distributionType": {
			"type": "string",
			"enum": ["distribution", "department"],
			"description": "This property indicates whether the distribution is system generated from a departmentor if it is one created by a user. In order to make it easy to distribute everything to one department, the system generates a distribution for each department."
		},
		"distributions": {
			"type": "array",
			"description": "A list of departments and their share of the distribution in percentage. The percentages always add up to 100%.",
			"items": {
				"title": "Distribution",
				"type": "object",
				"description": "Description of the distributions that make up a departmental distribution.",
				"properties": {
					"percentage": {
						"type": "number",
						"maximum": 100,
						"minimum": 0,
						"exclusiveMinimum": true,
						"description": "The percentage distributed to this department."
					},
					"department": {
						"type": "object",
						"description": "A reference to the department.",
						"properties": {
							"departmentNumber": {
								"type": "integer",
								"minimum": 1,
								"description": "A unique identifier of the department."
							},
							"self": {
								"type": "string",
								"format": "uri",
								"description": "The unique self reference of the department.",
								"required": true
							}
						}
					}
				}
			}
		},
		"self": {
			"type": "string",
			"format": "uri",
			"description": "The unique self reference of the departmental distribution.",
			"required": true
		}
	}
}