{
    "type": "object",
    "properties": {
        "name": {
            "description": "The name of the resource",
            "type": "string"
        },
        "path": {
            "description": "The resource file path",
            "type": "string"
        },
        "ino": {
            "description": "The ino of the file on disk",
            "type": "number"
        },
        "hash": {
            "description": "The sha1 of the resource",
            "type": "string"
        },
        "size": {
            "description": "The size of the resource",
            "type": "number"
        },
        "ext": {
            "description": "The suggested ext of the resource",
            "type": "string"
        },
        "type": {
            "description": "The resource type. Can be `forge`, `liteloader`, `resourcepack`, and etc.",
            "type": "string"
        },
        "tags": {
            "description": "The custom tag on this resource",
            "default": [],
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "domain": {
            "description": "The domain of the resource. This decide where (which folder) the resource go",
            "type": "string"
        },
        "metadata": {
            "description": "The resource specific metadata read from the file",
            "anyOf": [
                {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                },
                {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                    }
                }
            ]
        },
        "source": {
            "$ref": "#/definitions/Source",
            "description": "Where the resource imported from?"
        }
    },
    "required": [
        "domain",
        "ext",
        "hash",
        "ino",
        "metadata",
        "name",
        "path",
        "size",
        "source",
        "tags",
        "type"
    ],
    "definitions": {
        "Source": {
            "type": "object",
            "properties": {
                "uri": {
                    "description": "The source uris.\n- For the forge mod, it will be the forge://<modid>/<version>\n- For the liteloader mod, it will be the liteloader://<name>/<version>\n- For the curseforge file, it will be the curseforge://<fileId>\n\nIf the source is remote resource, it might also contain the uri like https://host/paths",
                    "default": [],
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "date": {
                    "description": "The date of import",
                    "default": "",
                    "type": "string"
                },
                "github": {
                    "description": "The github info for this source. If this is imported from github release, it will present.",
                    "type": "object",
                    "properties": {
                        "owner": {
                            "type": "string"
                        },
                        "repo": {
                            "type": "string"
                        },
                        "release": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "owner",
                        "release",
                        "repo"
                    ]
                },
                "curseforge": {
                    "description": "The curseforge info for this source. If this is imported from curseforge, it will present.",
                    "$ref": "#/definitions/CurseforgeSource"
                }
            },
            "required": [
                "date",
                "uri"
            ]
        },
        "CurseforgeSource": {
            "type": "object",
            "properties": {
                "projectId": {
                    "description": "The curseforge project id",
                    "type": "number"
                },
                "fileId": {
                    "description": "The file id",
                    "type": "number"
                }
            },
            "required": [
                "fileId",
                "projectId"
            ]
        }
    },
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false
}