{
    "$id": "https://example.com/schema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "description": "apps etl versions schema",
    "type": "object",
    "patternProperties": {
        "^[\\w_]+$": {
            "type": "object",
            "additionalProperties": false,
            "patternProperties": {
                "^[\\w_]+$": {
                    "type": "array",
                    "items":{
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "version": {
                                "type": "string"
                            },
                            "valid_from": {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "valid_until": {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "schema_version": {
                                "type": "string",
                                "pattern": "^[a-z0-9_-]{2,4}_\\d{8}$"
                            }
                        }
                    }
                }
            }
        }
    }
}
