Skip to content

Commit e3a324a

Browse files
author
Your Name
committed
1/ "additionalProperties": false is used in more place to forbid extra fields and so we can have strict validation.
2/ Removed "minItems" from scalar properties (e.g., for string or number). Because thing could go haywire as keyword "minItems" should be used for array, while the keyword "minItems used in type string and number. 3/ Unified enum values for "image-pull-policy" and "restart-policy" to avoid duplicates and different case variants. 4/ Factored out complex regex patterns for ports and publish into separate definitions (port-pattern and publish-pattern). 5/ Switched kinds from many hardcoded properties to a single patternProperties rule for flexibility in topology.kinds. 6 / AllOf logic remains intact for kind-conditional type constraints, but ensured they don’t contradict each other.
1 parent 31593dc commit e3a324a

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

schemas/clab.schema.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,11 @@
164164
"markdownDescription": "container [image-pull-policy](https://containerlab.dev/manual/nodes/#image-pull-policy) to use for this node",
165165
"enum": [
166166
"always",
167+
"Always",
167168
"never",
168-
"ifnotpresent"
169+
"Never",
170+
"ifnotpresent",
171+
"IfNotPresent"
169172
]
170173
},
171174
"restart-policy": {
@@ -174,9 +177,13 @@
174177
"markdownDescription": "container [restart-policy](https://containerlab.dev/manual/nodes/#restart-policy) to use for this node",
175178
"enum": [
176179
"no",
180+
"No",
177181
"on-failure",
182+
"On-failure",
183+
"Always",
178184
"always",
179-
"unless-stopped"
185+
"unless-stopped",
186+
"Unless-stopped"
180187
]
181188
},
182189
"kind": {

schemas/clab.schema.jsonc

+9-2
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,11 @@
174174
"markdownDescription": "container [image-pull-policy](https://containerlab.dev/manual/nodes/#image-pull-policy) to use for this node",
175175
"enum": [
176176
"always",
177+
"Always",
177178
"never",
178-
"ifnotpresent"
179+
"Never",
180+
"ifnotpresent",
181+
"IfNotPresent"
179182
]
180183
},
181184
"restart-policy": {
@@ -185,9 +188,13 @@
185188
"markdownDescription": "container [restart-policy](https://containerlab.dev/manual/nodes/#restart-policy) to use for this node",
186189
"enum": [
187190
"no",
191+
"No",
188192
"on-failure",
193+
"On-failure",
194+
"Always",
189195
"always",
190-
"unless-stopped"
196+
"unless-stopped",
197+
"Unless-stopped"
191198
]
192199
},
193200
"kind": {

0 commit comments

Comments
 (0)