{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://efrei.fr/student.schema.json",
    "title": "Facture",
    "description": "une facture",
    "type": "object",
    "properties": {
        "facId": {
            "type": "string"
        },
        "total": {
            "type": "number"
        }
    },
    "patternProperties": {
        "^[A-Z][0-9]{3}$": {
            "type": "object",
            "properties": {
                "nom": {
                    "type": "string"
                },
                "qt": {
                    "type": "number",
                    "minimum": 1
                },
                "prix": {
                    "type": "number"
                }
            },
            "required": [
                "nom",
                "qt",
                "prix"
            ]
        }
    },
    "required": [
        "facID",
        "total"
    ],
    "additionalProperties": false
}