{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/v2.7.0-rc3/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": {
                "version": 2,
                "config": {
                    "FileTransfer": true,
                    "PortForward": true
                }
            }
        }
    ],
    "required": [
        "client",
        "connect"
    ],
    "additionalProperties": false,
    "properties": {
        "client": {
            "type": "object",
            "required": [
                "version",
                "config"
            ],
            "additionalProperties": false,
            "properties": {
                "version": {
                    "title": "Mender client major version",
                    "type": "integer",
                    "example": 4
                },
                "config": {
                    "title": "Mender client configuration",
                    "type": "object",
                    "required": [
                        "Servers",
                        "ServerCertificate",
                        "TenantToken",
                        "InventoryPollIntervalSeconds",
                        "RetryPollIntervalSeconds",
                        "UpdatePollIntervalSeconds"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "Servers": {
                            "title": "Server URLs",
                            "description": "The server URLs which are used as the basis for API requests.",
                            "type": "array",
                            "uniqueItems": true,
                            "minItems": 1,
                            "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": {
                            "title": "Certificate path",
                            "description": "Path to certificate in filesystem.",
                            "type": "string",
                            "example": "/etc/site-conf/servert.crt"
                        },
                        "TenantToken": {
                            "title": "Tenant token",
                            "description": "A token which identifies which tenant a device belongs to.",
                            "type": "string",
                            "example": "dummy"
                        },
                        "InventoryPollIntervalSeconds": {
                            "title": "Inventory update interval",
                            "description": "Number of seconds to wait between each inventory update.",
                            "type": "integer",
                            "minimum": 0,
                            "example": 28800
                        },
                        "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": {
                            "title": "Update check interval",
                            "description": "Number of seconds to wait between each check for a new update.",
                            "type": "integer",
                            "minimum": 0,
                            "example": 1800
                        }
                    }
                }
            }
        },
        "connect": {
            "type": "object",
            "required": [
                "version",
                "config"
            ],
            "additionalProperties": false,
            "properties": {
                "version": {
                    "title": "Mender connect major version",
                    "type": "integer",
                    "example": 2
                },
                "config": {
                    "title": "Mender connect configuration",
                    "type": "object",
                    "required": [
                        "FileTransfer",
                        "PortForward"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "FileTransfer": {
                            "title": "File transfer",
                            "description": "Enable file transfer.",
                            "type": "boolean",
                            "example": true
                        },
                        "PortForward": {
                            "title": "Port forwarding",
                            "description": "Enable port forwarding.",
                            "type": "boolean",
                            "example": true
                        }
                    }
                }
            }
        }
    }
}
