Skip to content

Commit 5202591

Browse files
committed
docs(config): finish shcema for config files
1 parent 4aa7779 commit 5202591

File tree

6 files changed

+86
-1
lines changed

6 files changed

+86
-1
lines changed

docs/.gh-include

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
config.schema.json
2+
server-config.schema.json
3+
client-config.schema.json
4+
build-config.schema.json
5+
run-config.schema.json

docs/build-config.schema.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://nanoforge-dev.github.io/docs/cli/build-config.schema.json",
4+
"title": "Nanoforge CLI build config",
5+
"type": "object",
6+
"properties": {
7+
"entryFile": {
8+
"type": "string",
9+
"description": "the entry file for the program"
10+
},
11+
"outDir": {
12+
"type": "string",
13+
"description": "the directory where to put the built files"
14+
},
15+
},
16+
"required": ["entryFile", "outDir"]
17+
}

docs/client-config.schema.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://nanoforge-dev.github.io/docs/cli/client-config.schema.json",
4+
"title": "Nanoforge CLI client config",
5+
"type": "object",
6+
"properties": {
7+
"port": {
8+
"type": "string",
9+
"description": "the port to use"
10+
},
11+
"gameExposurePort": {
12+
"type": "string"
13+
},
14+
"build": {
15+
"$ref": "https://nanoforge-dev.github.io/docs/cli/build-config.schema.json"
16+
},
17+
"runtime": {
18+
"$ref": "https://nanoforge-dev.github.io/docs/cli/run-config.schema.json"
19+
}
20+
},
21+
"required": ["port", "gameExposurePort", "build", "runtime"]
22+
}

docs/config.schema.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
},
1414
"initFunctions": {
1515
"type": "boolean"
16+
},
17+
"client": {
18+
"$ref": "https://nanoforge-dev.github.io/docs/cli/client-config.schema.json"
19+
},
20+
"server": {
21+
"$ref": "https://nanoforge-dev.github.io/docs/cli/server-config.schema.json"
1622
}
17-
}
23+
},
24+
"required": ["name", "language", "initFunctions", "client", "server"]
1825
}

docs/run-config.schema.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://nanoforge-dev.github.io/docs/cli/run-config.schema.json",
4+
"title": "Nanoforge CLI run config",
5+
"type": "object",
6+
"properties": {
7+
"dir": {
8+
"type": "string",
9+
"description": "the directory to use"
10+
},
11+
},
12+
"required": ["dir"]
13+
}

docs/server-config.schema.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://nanoforge-dev.github.io/docs/cli/server-config.schema.json",
4+
"title": "Nanoforge CLI config",
5+
"type": "object",
6+
"properties": {
7+
"port": {
8+
"type": "string",
9+
"description": "the port to use"
10+
},
11+
"enable": {
12+
"type": "boolean"
13+
},
14+
"build": {
15+
"$ref": "https://nanoforge-dev.github.io/docs/cli/build-config.schema.json"
16+
},
17+
"runtime": {
18+
"$ref": "https://nanoforge-dev.github.io/docs/cli/run-config.schema.json"
19+
}
20+
},
21+
"required": ["port", "enable", "build", "runtime"]
22+
}

0 commit comments

Comments
 (0)