-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Currently 'default' can only be used with scalar types. It should be possible to specify a default value for mappings and sequences too.
See this schema for example:
---
type: map
mapping:
eggs:
type: map
mapping:
foo:
type: str
required: true
bar:
type: int
required: true
default:
foo: hello
bar: 42
With this schema, empty root mapping should be valid and it would default too:
eggs:
foo: hello
bar: 42
But if the eggs key is present then both foo and bar must be specified, so this one shouldn't be valid with above schema:
eggs:
foo: hello
Metadata
Metadata
Assignees
Labels
No labels