{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://www.espocrm.com/schema/metadata/app/metadata.json",
    "title": "app/metadata",
    "description": "Definitions for metadata itself.",
    "type": "object",
    "properties": {
        "frontendHiddenPathList": {
            "type": "array",
            "description": "Sections of metadata (defined as paths) to be hidden from the front-end.",
            "items": {
                "anyOf": [
                    {"const": "__APPEND__"},
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "frontendNonAdminHiddenPathList": {
            "type": "array",
            "description": "Sections of metadata (defined as paths) to be hidden from the front-end for non-admin users.",
            "items": {
                "anyOf": [
                    {"const": "__APPEND__"},
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "additionalBuilderClassNameList": {
            "type": "array",
            "description": "Additional builders. Allows adding conditional metadata. Should implement Espo\\Core\\Utils\\Metadata\\AdditionalBuilder. As of v8.4.",
            "items": {
                "type": "string"
            }
        },
        "aclDependencies": {
            "type": "object",
            "description": "Rules making a metadata sections available for a user when they don't have access to a scope.",
            "additionalProperties": {
                "description": "A metadata path, items are separated by dots.",
                "properties": {
                    "scope": {
                        "type": "string",
                        "description": "If a user have access to the scope, they will have access to a metadata section defined by a key."
                    },
                    "field": {
                        "type": "string",
                        "description": "If a user have access to the field (of a scope), they will have access to a metadata section defined by a key."
                    },
                    "anyScopeList": {
                        "type": "array",
                        "description": "Not supported. TBD.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}
