{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://www.espocrm.com/schema/metadata/app/formula.json",
    "title": "app/formula",
    "description": "Definitions for the formula editor.",
    "type": "object",
    "properties": {
        "functionList": {
            "type": "array",
            "description": "Functions available in the editor.",
            "items": {
                "anyOf": [
                    {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string",
                                "description": "A name."
                            },
                            "insertText": {
                                "type": "string",
                                "description": "A text to insert in the editor."
                            },
                            "returnType": {
                                "type": "string",
                                "description": "A return type."
                            }
                        }
                    },
                    {
                        "enum": ["__APPEND__"]
                    }
                ]
            }
        },
        "functionClassNameMap": {
            "type": "object",
            "description": "Function implementations. Should implement Espo\\Core\\Formula\\Func.",
            "additionalProperties": {
                "type": "string",
                "description": "A function."
            }
        }
    }
}
