{
	"$schema": "http://json-schema.org/draft-07/schema",
	"$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/menderConfig.json",
	"type": "object",
	"title": "Mender configuration",
	"examples": [
		{
			"client": {
				"version": 4,
				"config": {
					"Servers": ["https://hosted.mender.io"],
					"ServerCertificate": "/etc/site-conf/servert.crt",
					"TenantToken": "dummy",
					"InventoryPollIntervalSeconds": 28800,
					"RetryPollIntervalSeconds": 300,
					"UpdatePollIntervalSeconds": 1800
				}
			},
			"connect": {
				"FileTransfer": true,
				"PortForward": true
			}
		}
	],
	"required": [
		"client",
		"connect"
	],
	"additionalProperties": false,
	"properties": {
		"client": {
			"$id": "#/properties/client",
			"type": "object",
			"required": [
				"version",
				"config"
			],
			"additionalProperties": false,
			"properties": {
				"version": {
					"$id": "#/properties/client/properties/vserion",
					"title": "Mender client major version",
					"type": "integer",
					"example": 4
				},
				"config": {
					"$id": "#/properties/client/properties/config",
					"title": "Mender client configuration",
					"type": "object",
					"required": [
						"Servers",
						"ServerCertificate",
						"TenantToken",
						"InventoryPollIntervalSeconds",
						"RetryPollIntervalSeconds",
						"UpdatePollIntervalSeconds"
					],
					"additionalProperties": false,
					"properties": {
						"Servers": {
							"$id": "#/properties/client/properties/config/properties/Servers",
							"title": "Server URLs",
							"description": "The server URLs which are used as the basis for API requests.",
							"type": "array",
							"additionalItems": false,
							"items": {
								"$id": "#/properties/client/properties/config/properties/Servers/items",
								"title": "Server URL",
								"description": "The server URL which is used as the basis for API requests.",
								"type": "string",
								"example": "https://hosted.mender.io"
							},
							"example": ["https://hosted.mender.io"]
						},
						"ServerCertificate": {
							"$id": "#/properties/client/properties/config/properties/ServerCertificate",
							"title": "Certificate path",
							"description": "Path to certificate in filesystem.",
							"type": "string",
							"example": "/etc/site-conf/servert.crt"
						},
						"TenantToken": {
							"$id": "#/properties/client/properties/config/properties/TenantToken",
							"title": "Tenant token",
							"description": "A token which identifies which tenant a device belongs to.",
							"type": "string",
							"example": "dummy"
						},
						"InventoryPollIntervalSeconds": {
							"$id": "#/properties/client/properties/config/properties/InventoryPollIntervalSeconds",
							"title": "Inventory update interval",
							"description": "Number of seconds to wait between each inventory update.",
							"type": "integer",
							"minimum": 0,
							"example": 28800
						},
						"RetryPollIntervalSeconds": {
							"$id": "#/properties/client/properties/config/properties/RetryPollIntervalSeconds",
							"title": "Connection retry interval",
							"description": "Number of seconds to wait between each attempt to communicate with the server.",
							"type": "integer",
							"minimum": 0,
							"example": 300
						},
						"UpdatePollIntervalSeconds": {
							"$id": "#/properties/client/properties/config/properties/UpdatePollIntervalSeconds",
							"title": "Update check interval",
							"description": "Number of seconds to wait between each check for a new update.",
							"type": "integer",
							"minimum": 0,
							"example": 1800
						}
					}
				}
			}
		},
		"connect": {
			"$id": "#/properties/connect",
			"type": "object",
			"required": [
				"version",
				"config"
			],
			"additionalProperties": false,
			"properties": {
				"version": {
					"$id": "#/properties/connect/properties/version",
					"title": "Mender connect major version",
					"type": "integer",
					"example": 2
				},
				"config": {
					"$id": "#/properties/connect/properties/config",
					"title": "Mender connect configuration",
					"type": "object",
					"required": [
						"FileTransfer",
						"PortForward"
					],
					"additionalProperties": false,
					"properties": {
						"FileTransfer": {
							"$id": "#/properties/connect/properties/config/properties/FileTransfer",
							"title": "File transfer",
							"description": "Enable file transfer.",
							"type": "boolean",
							"example": true
						},
						"PortForward": {
							"$id": "#/properties/connect/properties/config/properties/PortForward",
							"title": "Port forwarding",
							"description": "Enable port forwarding.",
							"type": "boolean",
							"example": true
						}
					}
				}
			}
		}
	}
}
