{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Attendee JSON Schema to translate ORM Entity to ObjectType instance",
    "type": "object",
    "definitions": {
        "field": {
            "type": "object",
            "oneOf": [
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": [
                                "callback"
                            ]
                        },
                        "value": {
                            "type": "string"
                        },
                        "options": {
                            "type": "object"
                        }
                    }
                },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": [
                                "field",
                                "value"
                            ]
                        },
                        "value": {
                            "type": [
                                "string",
                                "null",
                                "boolean",
                                "number"
                            ]
                        },
                        "options": {
                            "type": "object"
                        }
                    }
                }
            ]
        }
    },
    "properties": {
        "display_name": {
            "$ref": "#/definitions/field"
        },
        "contact_details": {
            "$ref": "#/definitions/field"
        },
        "source": {
            "$ref": "#/definitions/field"
        },
        "source_id": {
            "$ref": "#/definitions/field"
        }
    },
    "required": [
        "source",
        "source_id"
    ]
}