{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "rulePriority": {
            "title": "The priority of the rule",
            "description": "0 has the highest priority. Only if a rule determines two paths equal, the rule with the next lower priority will be considered.",
            "id": "#rulePriority",
            "type": "integer",
            "minimum": 0
        },
        "transitCountParam": {
            "title": "The transit count rule considers the amount of solar systems",
            "description": "Paths with fewer transit systems are preferred.",
            "id": "#transitCountParam",
            "type": "object",
            "properties": {
                "priority": {
                    "$ref": "#rulePriority"
                }
            }
        },
        "minSecurityParam": {
            "title": "The minimum security rule avoids systems with lower security",
            "description": "Paths with the least amount of systems with lower security are preferred.",
            "id": "#minSecurityParam",
            "type": "object",
            "properties": {
                "priority": {
                    "$ref": "#rulePriority"
                },
                "limit": {
                    "title": "The lowest acceptable security value a solar system should have",
                    "type": "number",
                    "enum": [
                        0.1,
                        0.2,
                        0.3,
                        0.4,
                        0.5
                    ]
                }
            }
        },
        "maxSecurityParam": {
            "title": "The maximum security rule avoids systems with equal or higher security",
            "description": "Paths with the least amount of systems with equal or higher security are preferred.",
            "id": "#maxSecurityParam",
            "type": "object",
            "properties": {
                "priority": {
                    "$ref": "#rulePriority"
                },
                "limit": {
                    "title": "The first security value to avoid",
                    "type": "number",
                    "enum": [
                        0.5,
                        0.6,
                        0.7,
                        0.8,
                        0.9,
                        1.0
                    ]
                }
            }
        },
        "jumpDistanceParam": {
            "title": "The jump distance rule helps minimize jump fuel cost",
            "description": "Paths with the least usage of jump drives are preferred.",
            "id": "#jumpDistanceParam",
            "type": "object",
            "properties": {
                "priority": {
                    "$ref": "#rulePriority"
                }
            }
        }
    },
    "title": "A generic travel rule",
    "description": "The type field determines how to interpret the parameter.",
    "type": "object",
    "properties": {
        "transitCount": {
            "$ref": "#transitCountParam"
        },
        "minSecurity": {
            "$ref": "#minSecurityParam"
        },
        "maxSecurity": {
            "$ref": "#maxSecurityParam"
        },
        "jumpDistance": {
            "$ref": "#jumpDistanceParam"
        }
    }
}