Skip to content

Commit 7e6c118

Browse files
committed
further validate hub.config sections in values schema
- keys must start with caps to be valid (not much more validation is possible) - values must be objects does not validate class names or trait names, but gets the very basics
1 parent 5d7311d commit 7e6c118

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

jupyterhub/values.schema.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ properties:
207207
for more info.
208208
config:
209209
type: object
210-
additionalProperties: true
210+
additionalProperties: false
211211
description: |
212212
JupyterHub and its components (authenticators, spawners, etc), are
213213
Python classes that expose its configuration through
@@ -271,6 +271,18 @@ properties:
271271
the `--values` or `-f` flag. During merging, lists are replaced while
272272
dictionaries are updated.
273273
```
274+
# check that the first character is Capital,
275+
# which is required for valid section names
276+
# can't know all possible Configurable class names in advance, though
277+
patternProperties:
278+
"^[A-Z].*$":
279+
type: object
280+
additionalProperties: true
281+
description: |
282+
Pass-through traitlets configuration of Configurable classes.
283+
Keys must always be class names that start with capitals,
284+
and values must be objects.
285+
274286
properties:
275287
JupyterHub:
276288
type: object

0 commit comments

Comments
 (0)