Skip to content

Commit 341e852

Browse files
authored
Add a JSON schema file
This is for a private project I'm working on that will eventually be public. Once it's public, it'll be removed from my website and put into the public repo.
1 parent e8ab6c4 commit 341e852

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

public/ultra-schema-v1.json

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
{
2+
"type": "object",
3+
"description": "A schema representing the definition file for an Ultra Project",
4+
"properties": {
5+
"name": {
6+
"type": "string",
7+
"description": "The name of the Ultra Project"
8+
},
9+
"description": {
10+
"type": "string",
11+
"description": "The description of the Ultra Project"
12+
},
13+
"version": {
14+
"type": "string",
15+
"description": "The version of the Ultra Project",
16+
"enum": [
17+
"1.0.0"
18+
]
19+
},
20+
"scripts": {
21+
"type": "object",
22+
"description": "All scripts contained within the Ultra project. Scripts in the Ultra scope will be run against every solution. Consider these \"global\"",
23+
"additionalProperties": {
24+
"type": "string",
25+
"description": "The name of the script and the command it runs against every solution and project"
26+
}
27+
},
28+
"macros": {
29+
"type": "object",
30+
"description": "All macros contained within the Ultra project. Macros are simply commands that can be executed within the Ultra project. Think of these like scripts in Node's package.json",
31+
"additionalProperties": {
32+
"type": "string",
33+
"description": "The name of the macro and the command it executes"
34+
}
35+
},
36+
"solutions": {
37+
"type": "array",
38+
"description": "All solutions managed by Ultra",
39+
"items": {
40+
"type": "object",
41+
"description": "A single Ultra project",
42+
"properties": {
43+
"name": {
44+
"type": "string",
45+
"description": "The name of the solution"
46+
},
47+
"identifier": {
48+
"type": "string",
49+
"description": "The identifier of the solution"
50+
},
51+
"description": {
52+
"type": "string",
53+
"description": "The description of the solution"
54+
},
55+
"projects": {
56+
"type": "array",
57+
"description": "All projects contained within the solution",
58+
"items": {
59+
"type": "object",
60+
"description": "A single project within the solution",
61+
"properties": {
62+
"name": {
63+
"type": "string",
64+
"description": "The name of the project, not necessarily the identifier"
65+
},
66+
"identifier": {
67+
"type": "string",
68+
"description": "The actual name of the dotnet project as it is within the solution"
69+
},
70+
"description": {
71+
"type": "string",
72+
"description": "The description of the project"
73+
},
74+
"version": {
75+
"type": "string",
76+
"description": "The version of the project",
77+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
78+
},
79+
"scripts": {
80+
"type": "object",
81+
"description": "All scripts contained within the project. Scripts within the project are run only against the project",
82+
"additionalProperties": {
83+
"type": "string",
84+
"description": "The name of the script and the command it executes"
85+
}
86+
}
87+
},
88+
"anyOf": [
89+
{
90+
"required": [
91+
"name"
92+
]
93+
},
94+
{
95+
"required": [
96+
"identifier"
97+
]
98+
}
99+
]
100+
},
101+
"minItems": 1
102+
},
103+
"scripts": {
104+
"type": "object",
105+
"description": "All scripts contained within the solution. Scripts within the solution are run against the entire solution",
106+
"additionalProperties": {
107+
"type": "string",
108+
"description": "The name of the script and the command it executes"
109+
}
110+
}
111+
},
112+
"anyOf": [
113+
{
114+
"required": [
115+
"name"
116+
]
117+
},
118+
{
119+
"required": [
120+
"identifier"
121+
]
122+
}
123+
],
124+
"required": [
125+
"projects"
126+
]
127+
},
128+
"minItems": 1
129+
}
130+
},
131+
"required": [
132+
"name",
133+
"version"
134+
]
135+
}

0 commit comments

Comments
 (0)