-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.json
72 lines (72 loc) · 2.98 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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "_space.jsonc Schema",
"description": "Schema for _space.jsonc files that define configuration spaces within a weaveconfig directory. A space is any directory containing this file.",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "The URI of the JSON Schema that this document adheres to."
},
"name": {
"type": "string",
"description": "Unique identifier for this space. Used for dependency references and must be unique across all spaces in the weaveconfig directory.\n\nExample: \"auth-service\"",
"minLength": 1
},
"dependencies": {
"type": "array",
"description": "Names of other spaces this space depends on. These spaces must exist within the weaveconfig directory. Circular dependencies are not allowed.\n\nExample: [\"common\", \"database\"]",
"items": {
"type": "string",
"description": "Name of a dependency space.",
"minLength": 1
},
"uniqueItems": true
},
"space_to_parent_mapping": {
"type": "object",
"description": "Maps environments in this space to environments in the parent space. For root spaces (those without a parent), this maps to the ENV variable values. For non-root spaces, this maps to environments in the closest parent space (nearest ancestor directory with _space.jsonc).\n\nIf omitted, environments are inherited as-is from the parent.\n\nExample: {\"production\": [\"prod\", \"prod-dr\"], \"development\": [\"dev\"]}",
"additionalProperties": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true,
"minItems": 1
}
},
"environments": {
"type": "array",
"description": "List of environment names supported by this space. These names are used in mappings and must be unique within the space.\n\nExample: [\"development\", \"staging\", \"production\"]",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"generate": {
"description": "Configuration generation options for this space. When enabled, generates:\n- gen/config.json: Contains the resolved configuration\n- gen/binding.ts: Provides type-safe access to the configuration",
"oneOf": [
{
"type": "boolean",
"description": "When true, generates all available outputs (config.json and binding.ts)."
},
{
"type": "object",
"description": "Detailed generation options.",
"properties": {
"typescript": {
"type": "boolean",
"description": "When true, generates TypeScript type definitions (binding.ts) for this space's configuration."
}
},
"required": ["typescript"],
"additionalProperties": false
}
]
}
},
"required": ["name"],
"additionalProperties": false
}