-
-
Notifications
You must be signed in to change notification settings - Fork 78
/
schema.json
113 lines (113 loc) · 3.14 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Haxelib project configuration",
"description": "A haxelib project",
"type": "object",
"properties": {
"name": { "$ref": "#/definitions/projectName" },
"url": {
"description": "Project's website",
"type": "string",
"format": "uri"
},
"description": {
"description": "Short description of the project",
"type": "string"
},
"license": {
"description": "Open source license under which the project is licensed",
"enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache"]
},
"version": { "$ref": "#/definitions/semver" },
"classPath": {
"description": "Folder in the package which contains the source files for this project",
"type": "string"
},
"main": {
"description": "A class to run on `haxelib run libraryname` command.\nRelative to library root. E.g. to run `tools/Main.hx` the value should be `tools.Main`.\nDefault value since Haxe 4: Run",
"type": "string"
},
"contributors": {
"description": "List of project contributors that are allowed to upload to haxelib",
"type": "array",
"items": { "$ref": "#/definitions/userName" },
"minItems": 1,
"uniqueItems": true
},
"tags": {
"description": "List of tags for easier finding the project on haxelib",
"type": "array",
"items": { "$ref": "#/definitions/haxelibTag" },
"uniqueItems": true
},
"dependencies": {
"type": "object",
"description": "Project's dependencies",
"patternProperties": {
"^[A-Za-z0-9_.-]{3,}$": { "$ref": "#/definitions/dependencyVersion" }
},
"additionalProperties": false
},
"documentation": {
"type": "object",
"description": "Project's documentation resources",
"properties": {
"defines": {
"type": "string",
"description": "Relative path to json file describing this project's custom defines"
},
"metadata": {
"type": "string",
"description": "Relative path to json file describing this project's custom metadata"
}
},
"additionalProperties": false
},
"releasenote": {
"description": "Short description of changes made in this version",
"type": "string"
}
},
"additionalProperties": false,
"required": ["name", "license", "releasenote", "contributors", "version"],
"definitions": {
"userName": {
"description": "The name of a user",
"type": "string",
"minLength": 3,
"pattern": "^[A-Za-z0-9_.-]{3,}$"
},
"projectName": {
"description": "The name of a haxelib project",
"type": "string",
"minLength": 3,
"pattern": "^[A-Za-z0-9_.-]{3,}$",
"not": {
"anyOf": [
{"enum": ["haxe", "all"]},
{"pattern": "\\.(zip|hxml)$"}
]
}
},
"haxelibTag": {
"description": "A keyword or term associated with a haxelib project",
"type": "string",
"minLength": 2,
"pattern": "^[A-Za-z0-9_.-]{2,}$"
},
"semver": {
"type": "string",
"description": "Project's version",
"pattern": "^(\\d|[1-9]\\d*)\\.(\\d|[1-9]\\d*)\\.(\\d|[1-9]\\d*)(-(alpha|beta|rc)(\\.(\\d|[1-9]\\d*))?)?$"
},
"dependencyVersion": {
"oneOf": [
{ "$ref": "#/definitions/semver" },
{
"type": "string",
"maxLength": 0
}
]
}
}
}