Commit 115f5bb
authored
feat(input_schema): Support default, prefill and example in sub-properties (#555)
This PR:
- Adds support for specifying `default`, `prefill` and `example` for
sub-properties in input schema.
- change in apify-core is required to make it load the values, PR ready
here: apify/apify-core#23714
- parent property has priority over child property (but this is solved
in the apify-core) example:
```
{
"object": {
"default": { "key1": "fromParent" },
"properties": {
"key1": {
"default": "fromChild"
}
}
}
}
```
Default would be: `{ "object": { "key1": "fromParent" } }`
- Adds support for specifying validation keywords under `items`
property, like:
```
{
title: 'Field title',
description: 'My test field',
type: 'array',
editor: 'schemaBased',
items: {
type: 'string',
pattern: '^\\d+$',
minLength: 2,
maxLength: 4
}
}
```
This is handled automatically by `Ajv`.1 parent c9ea9f5 commit 115f5bb
File tree
3 files changed
+299
-106
lines changed- packages/json_schemas/schemas
- test
3 files changed
+299
-106
lines changed
0 commit comments