{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "id": "https://eddn.edcd.io/schemas/outfitting/2#",
    "properties": {
        "$schemaRef": {
            "type": "string"
        },
        "header": {
            "additionalProperties": true,
            "properties": {
                "gatewayTimestamp": {
                    "_format": "date-time",
                    "description": "Timestamp upon receipt at the gateway. If present, this property will be overwritten by the gateway; submitters are not intended to populate this property.",
                    "type": "string"
                },
                "softwareName": {
                    "type": "string"
                },
                "softwareVersion": {
                    "type": "string"
                },
                "uploaderID": {
                    "type": "string"
                }
            },
            "required": [
                "uploaderID",
                "softwareName",
                "softwareVersion"
            ],
            "type": "object"
        },
        "message": {
            "additionalProperties": false,
            "properties": {
                "horizons": {
                    "description": "Whether the sending Cmdr has a Horizons pass.",
                    "type": "boolean"
                },
                "marketId": {
                    "type": "number"
                },
                "modules": {
                    "items": {
                        "description": "Module symbolic name. e.g. Hpt_ChaffLauncher_Tiny, Int_Engine_Size3_Class5_Fast, Independant_Trader_Armour_Grade1, etc. Modules that depend on the Cmdr's purchases (e.g. bobbleheads, paintjobs) or rank (e.g. decals and PowerPlay faction-specific modules) should be omitted.",
                        "minLength": 1,
                        "pattern": "(^Hpt_|^Int_|_Armour_)",
                        "type": "string"
                    },
                    "minItems": 1,
                    "type": "array",
                    "_uniqueItems": true
                },
                "stationName": {
                    "minLength": 1,
                    "type": "string"
                },
                "systemName": {
                    "minLength": 1,
                    "type": "string"
                },
                "timestamp": {
                    "_format": "date-time",
                    "type": "string"
                }
            },
            "required": [
                "systemName",
                "stationName",
                "marketId",
                "timestamp",
                "modules"
            ],
            "type": "object"
        }
    },
    "required": [
        "$schemaRef",
        "header",
        "message"
    ],
    "type": "object"
}