{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Resolver Package Repository",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "name",
        "description",
        "homepage"
    ],
    "properties": {
        "name": {
            "type": "string",
            "description": "The name of the repository."
        },
        "description": {
            "type": "string",
            "description": "The description of the repository."
        },
        "homepage": {
            "type": "string",
            "description": "The url of the repository."
        },
        "package_target": {
            "type": "string",
            "description": "The directory where the resolver-packages.json file should be generated."
        },
        "web_target": {
            "type": "string",
            "description": "The directory where the generated HTML will be stored."
        },
        "web_template": {
            "type": "string",
            "description": "The template to use when generating HTML. This can be a name or a path to a template."
        },
        "auth": {
            "type": "object",
            "description": "Optional authentication tokens used to request the packages.",
            "additionalProperties": false,
            "properties": {
                "github": {
                    "type": "string",
                    "description": "The Github access token."
                }
            }
        },
        "packages": {
            "type": "array",
            "description": "The list with packages that exists.",
            "minItems": 1,
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "additionalProperties": true,
                "required": [
                    "type",
                    "url"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "The type of the package."
                    },
                    "url": {
                        "type": "string",
                        "description": "The url of the package."
                    }
                }
            }
        }
    }
}