{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "genericfitprocedure.json",
    "title": "GenericFitProcedure",
    "type": "object",
    "description": "Abstract class to create regression procedures",
    "allOf": [
        {
            "$ref": "procedure.json"
        }
    ],
    "properties": {
        "extra_pars": {
            "type": "object",
            "properties": {
                "warmup_steps": {
                    "type": "integer",
                    "description": "Skip this number of initial steps from the fit procedure",
                    "default": 0
                },
                "tail_steps": {
                    "type": "integer",
                    "description": "Use only this number of final steps for the fit procedure",
                    "default": 0
                },
                "use_forecast_range": {
                    "type": "boolean",
                    "description": "Fit using only pairs where sim is within forecasted range of values",
                    "default": false
                },
                "drop_warmup": {
                    "type": "boolean",
                    "description": "Eliminate warmup steps from output",
                    "default": false
                }
            },
            "description": "Additional parameters"
        },
        "boundaries": {
            "oneOf": [
                {
                    "type": "array",
                    "items": {
                        "allOf": [
                            { "$ref": "procedureboundary.json"},
                            {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "pattern": "^input_[0-9]+$"
                                    }
                                }
                            }
                        ]
                    },
                    "minItems": 1                    
                },
                {
                    "type": "array",
                    "description": "list of lists of observations",
                    "items": {
                        "$ref": "observationlist.json"
                    },
                    "minItems": 1
                },
                {
                    "type": "string",
                    "description": "Path to CSV file. First column must be the datetime index. Headers (first row) must indicate boundary names"
                }
            ]
        },
        "outputs": {
            "oneOf": [
                {
                    "type": "array",
                    "items": {
                        "allOf": [
                            { "$ref": "procedureboundary.json"},
                            {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "enum": ["output"]
                                    }
                                }
                            }
                        ]
                    },
                    "minItems": 1,
                    "maxItems": 1
                },
                {
                    "type": "array",
                    "description": "list of lists of observations",
                    "items": {
                        "$ref": "observationlist.json"
                    },
                    "minItems": 1
                },
                {
                    "type": "string",
                    "description": "Path to CSV file. First column must be the datetime index. Headers (first row) must indicate output names"
                }
            ]
        }
    }
}