This repository has been archived by the owner on Mar 12, 2022. It is now read-only.
forked from HaxeFoundation/haxelib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
93 lines (93 loc) · 2.45 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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"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"
},
"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
},
"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
}
]
}
}
}