{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "definitions": {
        "_gpsCheck": {
            "title": "Point A GPS Formatted String",
            "type": "string",
            "minLength": 1
        },
        "_latCheck": {
            "title": "Point A Latitude / Template",
            "type": "string",
            "minLength": 1
        },
        "_lonCheck": {
            "title": "Point A Longitude / Template",
            "type": "string",
            "minLength": 1
        },
        "_gpsCenter": {
            "title": "Point B GPS Formatted String",
            "type": "string",
            "minLength": 1
        },
        "_latCenter": {
            "title": "Point B Latitude / Template",
            "type": "string",
            "minLength": 1
        },
        "_lonCenter": {
            "title": "Point B Longitude / Template",
            "type": "string",
            "minLength": 1
        },
        "radius": {
            "title": "Radius (meters) / Template",
            "type": "string"
        },
        "resultPath": {
            "title": "Result Path",
            "description": "JSON Path for where to put the distance between the two coordinates",
            "type": "string"
        }
    },
    "anyOf": [
        {
            "properties": {
                "gpsCheck": {
                    "$ref": "#/definitions/_gpsCheck"
                },
                "gpsCenter": {
                    "$ref": "#/definitions/_gpsCenter"
                },
                "radius": {
                    "$ref": "#/definitions/radius"
                },
                "resultPath": {
                    "$ref": "#/definitions/resultPath"
                }
            },
            "additionalProperties": false,
            "required": [
                "radius",
                "gpsCheck",
                "gpsCenter"
            ]
        },
        {
            "properties": {
                "gpsCheck": {
                    "$ref": "#/definitions/_gpsCheck"
                },
                "latCenter": {
                    "$ref": "#/definitions/_latCenter"
                },
                "lonCenter": {
                    "$ref": "#/definitions/_lonCenter"
                },
                "radius": {
                    "$ref": "#/definitions/radius"
                },
                "resultPath": {
                    "$ref": "#/definitions/resultPath"
                }
            },
            "additionalProperties": false,
            "required": [
                "radius",
                "gpsCheck",
                "latCenter",
                "lonCenter"
            ]
        },
        {
            "properties": {
                "latCheck": {
                    "$ref": "#/definitions/_latCheck"
                },
                "lonCheck": {
                    "$ref": "#/definitions/_lonCheck"
                },
                "gpsCenter": {
                    "$ref": "#/definitions/_gpsCenter"
                },
                "radius": {
                    "$ref": "#/definitions/radius"
                },
                "resultPath": {
                    "$ref": "#/definitions/resultPath"
                }
            },
            "additionalProperties": false,
            "required": [
                "radius",
                "latCheck",
                "lonCheck",
                "gpsCenter"
            ]
        },
        {
            "properties": {
                "latCheck": {
                    "$ref": "#/definitions/_latCheck"
                },
                "lonCheck": {
                    "$ref": "#/definitions/_lonCheck"
                },
                "latCenter": {
                    "$ref": "#/definitions/_latCenter"
                },
                "lonCenter": {
                    "$ref": "#/definitions/_lonCenter"
                },
                "radius": {
                    "$ref": "#/definitions/radius"
                },
                "resultPath": {
                    "$ref": "#/definitions/resultPath"
                }
            },
            "additionalProperties": false,
            "required": [
                "radius",
                "latCheck",
                "lonCheck",
                "latCenter",
                "lonCenter"
            ]
        }
    ]
}