-
Notifications
You must be signed in to change notification settings - Fork 141
docs: Add enumSuggestedValues to input schema spec.
#2111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Preview for this PR was built for commit |
| | Property | Value | Required | Description | | ||
| |-----------------------|-----------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------| | ||
| | `type` | `string` | Yes | Specifies the type of input - `string` for single value. | | ||
| | `editor` | One of <ul><li>`resourcePicker`</li><li>`textfield`</li><li>`hidden`</li></ul> | No | Visual editor used for <br/>the input field. Defaults to `resourcePicker`. | | ||
| | `resourceType` | One of <ul><li>`dataset`</li><li>`keyValueStore`</li><li>`requestQueue`</li></ul> | Yes | Type of Apify Platform resource | | ||
| | `resourcePermissions` | Array of strings; allowed values: <ul><li>`READ`</li><li>`WRITE`</li></ul> | Yes | Permissions requested for the referenced resource. Use [\"READ\"] for read-only access, or [\"READ\", \"WRITE\"] to allow writes. | | ||
| | `pattern` | String | No | Regular expression that will be used to validate the input. If validation fails, the Actor will not run. | | ||
| | `minLength` | Integer | No | Minimum length of the string. | | ||
| | `maxLength` | Integer | No | Maximum length of the string. | | ||
|
|
||
| #### Multiple values properties | ||
|
|
||
| | Property | Value | Required | Description | | ||
| |----------------|-----------------------------------------------------------------------------------|----------|----------------------------------------------------------------------------| | ||
| | `type` | `array` | Yes | Specifies the type of input - `array` for multiple values. | | ||
| | `editor` | One of <ul><li>`resourcePicker`</li><li>`hidden`</li></ul> | No | Visual editor used for <br/>the input field. Defaults to `resourcePicker`. | | ||
| | `resourceType` | One of <ul><li>`dataset`</li><li>`keyValueStore`</li><li>`requestQueue`</li></ul> | Yes | Type of Apify Platform resource | | ||
| | `resourcePermissions` | Array of strings; allowed values: <ul><li>`READ`</li><li>`WRITE`</li></ul> | Yes | Permissions requested for the referenced resources. Use [\"READ\"] for read-only access, or [\"READ\", \"WRITE\"] to allow writes. Applies to each selected resource. | | ||
| | `minItems` | Integer | No | Minimum number of items the array can contain. | | ||
| | `maxItems` | Integer | No | Maximum number of items the array can contain. | | ||
| | Property | Value | Required | Description | | ||
| |-----------------------|-----------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | `type` | `array` | Yes | Specifies the type of input - `array` for multiple values. | | ||
| | `editor` | One of <ul><li>`resourcePicker`</li><li>`hidden`</li></ul> | No | Visual editor used for <br/>the input field. Defaults to `resourcePicker`. | | ||
| | `resourceType` | One of <ul><li>`dataset`</li><li>`keyValueStore`</li><li>`requestQueue`</li></ul> | Yes | Type of Apify Platform resource | | ||
| | `resourcePermissions` | Array of strings; allowed values: <ul><li>`READ`</li><li>`WRITE`</li></ul> | Yes | Permissions requested for the referenced resources. Use [\"READ\"] for read-only access, or [\"READ\", \"WRITE\"] to allow writes. Applies to each selected resource. | | ||
| | `minItems` | Integer | No | Minimum number of items the array can contain. | | ||
| | `maxItems` | Integer | No | Maximum number of items the array can contain. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tables were just reformatted to make the linter happy
|
Preview for this PR was built for commit |
sources/platform/actors/development/actor_definition/input_schema/specification.md
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Show resolved
Hide resolved
marcel-rbro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed, requested some minor changes
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
|
Preview for this PR was built for commit |
marcel-rbro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, didn't notice that there are 2 parts of the documentation previously, one for arrays and one for strings. Is it possible to not have duplicate content and merge to content into a single section? To have this published in time, this is a question for the future, @TC-MO
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
sources/platform/actors/development/actor_definition/input_schema/specification.md
Outdated
Show resolved
Hide resolved
I don't think it could be merged easily with the current structure. But the whole page is a bit mess and should be reworked as a whole. |
|
Preview for this PR was built for commit |
marcel-rbro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Document the new
enumSuggestedValuesproperty in the input schema introduced by apify/apify-shared-js#569Note
Documents
enumSuggestedValuesforselecteditors (string and array) with examples, and updates tables/guidance to distinguish strictenumvalidation from suggested values.sources/platform/actors/development/actor_definition/input_schema/specification.md):enumSuggestedValuesoption to table with description and clarifyenumTitlesapplies toenumandenumSuggestedValues.enumenforces strict validation.enumvs suggestedenumSuggestedValues, including UI screenshots.enumand suggested multiselect usingenumSuggestedValuesexamples with screenshots.itemswithenum/enumSuggestedValuesandenumTitles.Written by Cursor Bugbot for commit 6f408c8. Configure here.