{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "demo",
    "description": "Reference data for the calculation of child support",
    "properties": {
        "MARate": {
            "type": "array",
            "title": "Alimony rate",
            "description": "Maintenance rate based on the access and accommodation and the number of children",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "internal identifier",
                        "title": "id [primarykey:1, autoincrement:18, type:integer]"
                    },
                    "AARight": {
                        "type": "integer",
                        "description": "Visitation and accommodation (1: reduced , 2 : classic, 3: alternated)",
                        "oneOf": [
                            {
                                "type": "integer",
                                "enum": [
                                    1
                                ],
                                "title": "reduced"
                            },
                            {
                                "type": "integer",
                                "enum": [
                                    2
                                ],
                                "title": "classic"
                            },
                            {
                                "type": "integer",
                                "enum": [
                                    3
                                ],
                                "title": "alternated"
                            }
                        ],
                        "default": 1,
                        "title": "Visitation rights and accommodation [type:choice]"
                    },
                    "nChildren": {
                        "type": "integer",
                        "description": "Number of children",
                        "default": 1,
                        "title": "Number of children [type:integer]"
                    },
                    "rate": {
                        "type": "number",
                        "description": "Alimony rate",
                        "title": "Taux [type:percent]"
                    }
                },
                "required": [
                    "id",
                    "AARight",
                    "nChildren",
                    "rate"
                ]
            }
        }
    },
    "required": [
        "MARate"
    ]
}