{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "BASEURL/browserInfo.json",
"title": "browserInfo",
"description": "Browser Information",
"type": "object",
"properties": {
"acceptHeaders": {
"type": "string",
"maxLength": 2048,
"description": "Exact content of the HTTP accept headers from the browser."
},
"ipAddress": {
"type": "string",
"oneOf": [{"format": "ipv4"},{"format": "ipv6"}],
"description": "IP address of the browser as returned by the HTTP headers."
},
"javaEnabled": {"type": "boolean"},
"javaScriptEnabled": {"type": "boolean"},
"language": {
"type": "string",
"minLength": 2,
"maxLength": 8,
"description": "Value representing the browser language as defined in IETF BCP47, e.g. 'en', 'de', 'fr', 'en-US', 'en-GB', 'de-DE', 'de-AT', ..."
},
"colorDepth": {
"type": "integer",
"enum": [1, 4, 8, 15, 16, 24, 30, 32, 48],
"description": "Value representing the bit depth of the colour palette for displaying images, in bits per pixel."
},
"screenHeight": {
"type": "integer",
"minLength": 1,
"maxLength": 6,
"description": "Total height of the Cardholder’s screen in pixels."
},
"screenWidth": {
"type": "integer",
"minLength": 1,
"maxLength": 6,
"description": "Total width of the cardholder’s screen in pixels."
},
"timeZoneOffset": {
"type": "string",
"minLength": 1,
"maxLength": 5,
"description": "Time-zone offset in minutes between UTC and the Cardholder browser local time."
},
"userAgent": {
"type": "string",
"maxLength": 2048,
"description": "Exact content of the HTTP user-agent header."
}
},
"if": {
"properties": {
"javaScriptEnabled": {"enum": [true]}
}
},
"then": {
"required": ["acceptHeaders", "javaEnabled", "javaScriptEnabled", "colorDepth", "screenHeight", "screenWidth", "timeZoneOffset", "language", "userAgent"]
},
"else": {
"required": ["acceptHeaders", "ipAddress", "javaScriptEnabled", "language", "userAgent"]
},
"additionalProperties": false
} |