You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For objects, it will be really handy to have an autoPopulate array so that one could do schemas like this:
{"type": "array","items": {"type": "object","properties": {"name": {"type": "string","default": "My Project"},"description": {"type": "string","default": "A project I worked on.",},"picture": {"type": "string","format": "image-file",},"link": {"type": "string","default": "http://example.com"}},"required": ["name","description","picture"],"autoPopulate": ['link']}}
instead of like this:
{"type": "array","items": {"type": "object","properties": {"name": {"type": "string","default": "My Project"},"description": {"type": "string","default": "A project I worked on.",},"picture": {"type": "string","format": "image-file",},"link": {"type": "string","default": "http://example.com"}},"required": ["name","description","picture"],"default": {"name": "My Project","description": "A project I worked on.","link": "http://example.com","picture": ""}}}
The difference is that we don't need to mirror the default values in two places–the autoPopulate will specify that by default, we will include the link property, and the default value can be grabbed from the leaf just like when we auto-populate required properties.
The text was updated successfully, but these errors were encountered:
For objects, it will be really handy to have an
autoPopulate
array so that one could do schemas like this:instead of like this:
The difference is that we don't need to mirror the default values in two places–the
autoPopulate
will specify that by default, we will include thelink
property, and the default value can be grabbed from the leaf just like when we auto-populaterequired
properties.The text was updated successfully, but these errors were encountered: