{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "expressionprocedure.json",
    "title": "ExpressionProcedure",
    "type": "object",
    "description": "Expression procedure. It evaluates each the given python expression replacing 'value' placeholder for the given input value. ",
    "allOf": [
        {
            "$ref": "procedure.json"
        }
    ],
    "properties": {
        "type": {
            "type": "string",
            "enum": [
                "Expression",
                "ExpressionProcedure"
            ]
        },
        "expression": {
            "type": "string",
            "description": "python expression. Each occurence of 'value' will be replaced with the given input value"
        },
        "extra_pars": {
            "type": "object",
            "description": "additional parameters",
            "properties": {
                "allow_na": {
                    "type": "boolean",
                    "description": "Allow for null values in input",
                    "default": false
                }
            }
        },
        "boundaries": {
            "type": "array",
            "items": {
                "allOf": [
                    { "$ref": "procedureboundary.json"},
                    {
                        "type": "object",
                        "properties": {
                            "name": {
                                "enum": ["input"]
                            }
                        }
                    }
                ]
            },
            "minItems": 1,
            "maxItems": 1
        },
        "outputs": {
            "type": "array",
            "items": {
                "allOf": [
                    { "$ref": "procedureboundary.json"},
                    {
                        "type": "object",
                        "properties": {
                            "name": {
                                "enum": ["output"]
                            }
                        }
                    }
                ]
            },
            "minItems": 1,
            "maxItems": 1
        }
    },
    "required": [
        "type",
        "expression"
    ]
}