{
    "type": "array",
    "items": {
        "$ref": "#/$defs/JSONDocument"
    },
    "$defs": {
        "JSONDocument": {
            "title": "JSONDocument",
            "description": "This is a single JSON document in the JSON file.",
            "type": "object",
            "properties": {
                "id": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                },
                "category": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                },
                "subcategory": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                },
                "section_label": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                },
                "metadata": {
                    "type": "object",
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "integer"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "integer"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "contents": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                },
                "type": {
                    "enum": [
                        "application/pdf",
                        "text/plain"
                    ],
                    "default": "text/plain"
                },
                "path": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                },
                "source": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/DocumentSource"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                }
            },
            "required": []
        },
        "DocumentSource": {
            "title": "DocumentSource",
            "description": "The source of the document.",
            "type": "object",
            "properties": {
                "type": {
                    "enum": [
                        "application/pdf",
                        "text/plain"
                    ]
                },
                "path": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                },
                "data": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null
                }
            },
            "required": [
                "type"
            ]
        }
    }
}