{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "http://www.myelintek.com/schemas/mlarchive_manifest_schema_v1.json",
    "type": "object",
    "properties": {
        "models": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1
                    },
                    "version": {
                        "type": "string",
                        "minLength": 1
                    },
                    "description": {
                        "type": "string"
                    },
                    "framework": {
                        "enum": [
                            "tensorflow",
                            "tensorflow.keras",
                            "pytorch",
                            "pytorch.lightning"
                        ]
                    },
                    "inputs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/$defs/io_item"
                        }
                    },
                    "outputs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/$defs/io_item"
                        }
                    },
                    "enc_model_cleanup": {
                        "enum": [
                            "never",
                            "after-load"
                        ]
                    },
                    "enc_model_cleanup_files": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "pattern": "^[^/].*"
                        }
                    }
                },
                "required": [
                    "name",
                    "version",
                    "framework"
                ],
                "additionalProperties": false
            }
        }
    },
    "required": [
        "models"
    ],
    "additionalProperties": false,
    "$defs": {
        "io_item": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                }
            },
            "additionalProperties": false
        }
    }
}