{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://example.com/pukk-configuration-schema.json", 
	"title": "PuKK Configuration Schema",
	"description": "Schema for PuKK configuration files.",
	"type": "object",
	"properties": {
		"wifi_ssid": {
			"type": "string",
			"description": "The SSID of the Wi-Fi network to connect to."
		},
		"wifi_pass": {
			"type": "string",
			"description": "The password for the Wi-Fi network."
		},
		"wifi_hidden": {
			"type": "boolean",
			"description": "Whether the Wi-Fi network is hidden."
		},		
		"wifi_retry_interval_s": {
			"type": "integer",
			"description": "The interval in seconds to wait before retrying Wi-Fi connection.",
			"exclusiveMinimum": 0
		},
		"enable_ota": {
			"type": "boolean",
			"description": "Whether to perform OTA updates."
		},
		"protocol": {
			"type": "string",
			"description": "The protocol to use for communication.",
			"enum": ["HTTP", "MQTT"]
		}, 
		"http_server_address": {
			"type": "string",
			"description": "The address of the server."
		},
		"http_poll_interval_ms": {
			"type": "integer",
			"description": "The interval in milliseconds for polling the server.",
			"minimum": 0,
			"maximum": 65536
		},
		"http_authorization_token": {
			"type": "string",
			"description": "The authorization token for the server."
		},
		"http_custom_headers": {
			"type": "array",
			"description": "Custom headers to be sent to the server",
			"items": {
				"type": "string"
			}
		},
		"mqtt_broker": {
			"type": "string",
			"description": "The address of the MQTT broker. Use 'mqtts://' for making use of TLS connections."
		},
		"mqtt_port": {
			"type": "integer",
			"description": "The port of the MQTT broker.",
			"minimum": 0,
			"maximum": 65535
		},
		"mqtt_username": {
			"type": "string",
			"description": "The username for the MQTT broker."
		},
		"mqtt_password": {
			"type": "string",
			"description": "The password for the MQTT broker."
		},
		"mqtt_topic_prefix": {
			"type": "string",
			"description": "The prefix for the MQTT topics."
		}
	}
}