{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"$id": "http://example.com/root.json",
	"type": "object",
	"title": "Schema for the GlyGen home page init web service",
	"required": ["version", "statistics", "hot_topic"],
	"properties": {
		"version": {
			"$id": "#/properties/version",
			"type": "array",
			"description": "A list of versions for individual components of the software.",
			"items": {
				"$id": "#/properties/version/items",
				"type": "object",
				"title": "Object that stores the name, version and release date of a software component",
				"required": ["component", "version", "url", "release_date"],
				"properties": {
					"component": {
						"$id": "#/properties/version/items/properties/component",
						"type": "string",
						"description": "Type of the component (e.g. software, api, data).",
						"examples": ["software"]
					},
					"component_name": {
						"$id": "#/properties/version/items/properties/component_name",
						"type": "string",
						"description": "Name of the component (e.g. Portal, Webservice, Data).",
						"examples": ["Portal", "Webservice", "Data"]
					},
					"version": {
						"$id": "#/properties/version/items/properties/version",
						"type": "string",
						"description": "Version number of the software component.",
						"examples": ["1.0.0"]
					},
					"url": {
						"$id": "#/properties/version/items/properties/url",
						"type": "string",
						"description": "Url of the version number which will take user to the website where version details are listed.",
						"examples": [
							"https://github.com/glygener/glygen-frontend/wiki/Release-notes"
						]
					},
					"release_date": {
						"$id": "#/properties/version/items/properties/release_date",
						"type": "string",
						"description": "Release data of the software component. Uses ISO8601.",
						"examples": ["2008-09-15T15:53:00+05:00"]
					}
				}
			}
		},
		"statistics": {
			"$id": "#/properties/statistics",
			"type": "array",
			"description": "A list of statistic values grouped by species.",
			"items": {
				"$id": "#/properties/statistics/items",
				"type": "object",
				"title": "A list of objects providing species specific statistics.",
				"required": ["species", "proteins", "glycoproteins", "glycans"],
				"properties": {
					"species": {
						"$id": "#/properties/statistics/items/properties/species",
						"type": "string",
						"description": "Name of the species.",
						"examples": ["Homo sapiens"]
					},
					"proteins": {
						"$id": "#/properties/statistics/items/properties/proteins",
						"type": "integer",
						"description": "Number of proteins for this species in GlyGen.",
						"examples": [20997]
					},
					"glycoproteins": {
						"$id": "#/properties/statistics/items/properties/glycoproteins",
						"type": "integer",
						"description": "Number of GlycoProteins for this species in GlyGen.",
						"examples": [4429]
					},
					"glycans": {
						"$id": "#/properties/statistics/items/properties/glycans",
						"type": "integer",
						"description": "Number of glycans for this species in GlyGen.",
						"examples": [3300]
					}
				}
			}
		},
		"hot_topic": {
			"$id": "#/properties/hot_topic",
			"type": "object",
			"description": "A banner on the top of the homepage that displays announcements.",
			"examples": [
				{
					"type": "info",
					"headline": "",
					"message": "",
					"url": ""
				}
			],
			"required": ["type", "headline", "message", "url"],
			"properties": {
				"type": {
					"$id": "#/properties/hot_topic/properties/type",
					"type": "string",
					"description": "Informatinal banner types (e.g. error, warning, info, success, and general). We will have 5 different types of informational banners. They are have a different background color.",
               "examples": [
                  "error", 
                  "warning",
                  "info",
                  "success",
                  "general"
               ]
				},
				"headline": {
					"$id": "#/properties/hot_topic/properties/headline",
					"type": "string",
					"description": "Headline or the title of the message.",
					"examples": ["Upcomming maintenance of the portal."]
				},
				"message": {
					"$id": "#/properties/hot_topic/properties/message",
					"type": "string",
					"description": "Detailed message of the event.",
					"examples": [
						"Estimated downtime: Friday, March 6 11:00 PM – Saturday, March 7 10:00 AM EDT."
					]
				},
				"url": {
					"$id": "#/properties/hot_topic/properties/url",
					"type": "string",
					"description": "User will be redirected to a different website to read more about the topic.",
					"examples": ["https://wiki.glygen.org/index.php/Main_Page"]
				}
			}
		}
	}
}
