{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": true,
    "definitions": {
        "dependancyVersion": {
            "oneOf": [
                {
                    "$ref": "#/definitions/semver"
                },
                {
                    "maxLength": 0,
                    "type": "string"
                }
            ]
        },
        "haxelibTag": {
            "description": "A keyword or term associated with a haxelib project",
            "minLength": 2,
            "pattern": "^[A-Za-z0-9_.-]{2,}$",
            "type": "string"
        },
        "projectName": {
            "description": "The name of a haxelib project",
            "minLength": 3,
            "pattern": "^[A-Za-z0-9_.-]{3,}$",
            "type": "string"
        },
        "semver": {
            "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-(alpha|beta|rc)(\\.([0-9]+))?)?$",
            "type": "string"
        },
        "userName": {
            "description": "The name of a user",
            "minLength": 3,
            "pattern": "^[A-Za-z0-9_.-]{3,}$",
            "type": "string"
        }
    },
    "description": "A haxelib project",
    "properties": {
        "classPath": {
            "description": "The folder in the package which contains the source files for this haxelib",
            "type": "string"
        },
        "contributors": {
            "items": {
                "$ref": "#/definitions/userName"
            },
            "minItems": 1,
            "type": "array",
            "_uniqueItems": true
        },
        "dependencies": {
            "additionalProperties": {
                "$ref": "#/definitions/dependancyVersion"
            },
            "type": "object"
        },
        "description": {
            "type": "string"
        },
        "license": {
            "description": "The open source license under which the project is licensed",
            "enum": [
                "GPL",
                "LGPL",
                "BSD",
                "Public",
                "MIT"
            ]
        },
        "name": {
            "$ref": "#/definitions/projectName"
        },
        "releasenote": {
            "type": "string"
        },
        "tags": {
            "items": {
                "$ref": "#/definitions/haxelibTag"
            },
            "type": "array",
            "_uniqueItems": true
        },
        "url": {
            "_format": "uri",
            "type": "string"
        },
        "version": {
            "$ref": "#/definitions/semver"
        }
    },
    "required": [
        "name",
        "license",
        "releasenote",
        "contributors",
        "version"
    ],
    "type": "object"
}