{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://helpcompare.com/data/schema/migrations.schema.json",
    "title": "HelpCompare migrations dataset",
    "type": "object",
    "required": [
        "dataset",
        "license",
        "records"
    ],
    "properties": {
        "records": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "slug",
                    "url",
                    "from",
                    "to",
                    "guide_verified",
                    "native_importer",
                    "moves"
                ],
                "properties": {
                    "slug": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "from": {
                        "type": "string"
                    },
                    "from_slug": {
                        "type": "string",
                        "description": "see /data/tools/{slug}.json"
                    },
                    "to": {
                        "type": "string"
                    },
                    "to_slug": {
                        "type": "string"
                    },
                    "guide_verified": {
                        "type": "string",
                        "format": "date"
                    },
                    "native_importer": {
                        "type": "object",
                        "properties": {
                            "available": {
                                "type": [
                                    "boolean",
                                    "null"
                                ]
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "evidence": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Verbatim quote from the guide"
                            }
                        }
                    },
                    "plan_required": {
                        "type": "object",
                        "properties": {
                            "text": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "evidence": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Verbatim quote from the guide"
                            }
                        }
                    },
                    "moves": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "data",
                                "status",
                                "evidence"
                            ],
                            "properties": {
                                "data": {
                                    "type": "string"
                                },
                                "status": {
                                    "enum": [
                                        "automatic",
                                        "partial",
                                        "manual_export_import",
                                        "rebuild",
                                        "not_migrated"
                                    ]
                                },
                                "detail": {
                                    "type": "string"
                                },
                                "evidence": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Verbatim quote from the guide"
                                }
                            }
                        }
                    },
                    "side_by_side": {
                        "type": "object"
                    },
                    "duration_note": {
                        "type": "object"
                    },
                    "third_party_tools": {
                        "type": "array"
                    }
                }
            }
        }
    }
}