{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"$id": "http://json-schema.int.adscore.com/gwoc/domain/list.schema.json",
	"title": "GWoC Domain List",
	"description": "List domains registered in GWoC mapping system",
	"type": "object",
	"required": [
		"route_params"
	],
	"properties": {
		"route": {
			"type": "object",
			"properties": {
				"path": {
					"const": "/account/{account_id}/gwoc/domain"
				},
				"methods": {
					"const": ["GET"]
				}
			}
		},
		"route_params": {
			"type": "object",
			"description": "Route attributes",
			"required": [
				"account_id"
			],
			"properties": {
				"account_id": {
					"type": "integer"
				}
			}
		},
		"query": {
			"type": "object",
			"description": "Optional conditions",
			"properties": {
				"status": {
					"type": "string",
					"enum": ["active", "inactive", "pending"]
				},
				"id": {
					"description": "Domain identifiers",
					"oneOf": [
						{
							"type": "integer"
						}, 
						{
							"type": "array",
							"uniqueItems": true,
							"items": {
								"type": "integer"
							}
						},
						{
							"type": "string",
							"pattern": "^(\\d+)(,\\d+)+$"
						}
					]				
				}
			}
		}
	}
}
