{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
        "policies": {
            "type": "object",
            "properties": {
                "credentialFormat": {
                    "type": "object",
                    "properties": {
                        "standards": {
                            "type": "object",
                            "properties": {
                                "w3c": {
                                    "type": "object",
                                    "properties": {
                                        "vc-data-model": {
                                            "type": "object",
                                            "properties": {
                                                "v1.1": {
                                                    "type": "object",
                                                    "properties": {
                                                        "enabled": {
                                                            "type": "boolean"
                                                        }
                                                    }
                                                },
                                                "v2.0": {
                                                    "type": "object",
                                                    "properties": {
                                                        "enabled": {
                                                            "type": "boolean"
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "iso": {
                                    "type": "object",
                                    "properties": {
                                        "18013-5:2021": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "trustedIssuer": {
                    "type": "object",
                    "properties": {
                        "skip": {
                            "type": "boolean"
                        },
                        "trustedIssuerRootCertificates": {
                            "type": "array",
                            "items": {
                                "anyOf": [
                                    {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "const": "pem"
                                            },
                                            "pem": {
                                                "type": "string",
                                                "minLength": 1,
                                                "pattern": "-----BEGIN CERTIFICATE-----[\\s\\S]+-----END CERTIFICATE-----"
                                            }
                                        },
                                        "required": ["type", "pem"]
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "const": "vical"
                                            },
                                            "cbor": {
                                                "type": "string"
                                            },
                                            "vicalTrustedCertificates": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "pattern": "-----BEGIN CERTIFICATE-----[\\s\\S]+-----END CERTIFICATE-----"
                                                }
                                            }
                                        },
                                        "required": ["type", "cbor", "vicalTrustedCertificates"]
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "const": "vical-url"
                                            },
                                            "url": {
                                                "type": "string",
                                                "format": "uri"
                                            },
                                            "vicalTrustedCertificates": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "pattern": "-----BEGIN CERTIFICATE-----[\\s\\S]+-----END CERTIFICATE-----"
                                                }
                                            }
                                        },
                                        "required": ["type", "url", "vicalTrustedCertificates"]
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "const": "predefined"
                                            },
                                            "tag": {
                                                "type": "string",
                                                "enum": ["vidos", "aamva", "french-iaca-sandbox"]
                                            }
                                        },
                                        "required": ["type", "tag"]
                                    }
                                ]
                            }
                        }
                    }
                },
                "presentationSubmission": {
                    "type": "object",
                    "properties": {
                        "onPresentationEvaluationWarning": {
                            "type": "string",
                            "enum": ["valid", "error", "warning"]
                        },
                        "skip": {
                            "type": "boolean"
                        }
                    }
                },
                "transactionData": {
                    "type": "object",
                    "properties": {
                        "skip": {
                            "type": "boolean"
                        },
                        "onHashMismatch": {
                            "type": "string",
                            "enum": ["valid", "error", "warning"]
                        }
                    }
                }
            }
        }
    }
}
