Skip to content

Conversation

@mfori
Copy link
Member

@mfori mfori commented Nov 25, 2025

Document the new enumSuggestedValues property in the input schema introduced by apify/apify-shared-js#569


Note

Documents enumSuggestedValues for select editors (string and array) with examples, and updates tables/guidance to distinguish strict enum validation from suggested values.

  • Input schema docs (sources/platform/actors/development/actor_definition/input_schema/specification.md):
    • String type:
      • Add enumSuggestedValues option to table with description and clarify enumTitles applies to enum and enumSuggestedValues.
      • Note that enum enforces strict validation.
    • Select editor (string):
      • Add separate examples for strict enum vs suggested enumSuggestedValues, including UI screenshots.
    • Array type (multiselect):
      • Introduce "Select editor for arrays" section.
      • Add strict multiselect using enum and suggested multiselect using enumSuggestedValues examples with screenshots.
      • Clarify defining options via items with enum/enumSuggestedValues and enumTitles.

Written by Cursor Bugbot for commit 6f408c8. Configure here.

@mfori mfori requested a review from valekjo November 25, 2025 13:38
@mfori mfori self-assigned this Nov 25, 2025
@mfori mfori requested a review from TC-MO as a code owner November 25, 2025 13:38
@mfori mfori added adhoc Ad-hoc unplanned task added during the sprint. t-console Issues with this label are in the ownership of the console team. labels Nov 25, 2025
@github-actions github-actions bot added this to the 128th sprint - Console team milestone Nov 25, 2025
@apify-service-account
Copy link

Preview for this PR was built for commit 6f408c88 and is ready at https://pr-2111.preview.docs.apify.com!

Comment on lines +942 to +961
| 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. |
Copy link
Member Author

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

@apify-service-account
Copy link

Preview for this PR was built for commit 0aebea15 and is ready at https://pr-2111.preview.docs.apify.com!

@TC-MO TC-MO requested a review from marcel-rbro November 25, 2025 15:15
Copy link
Contributor

@marcel-rbro marcel-rbro left a 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

@apify-service-account
Copy link

Preview for this PR was built for commit aaca599b and is ready at https://pr-2111.preview.docs.apify.com!

@mfori mfori requested a review from marcel-rbro November 27, 2025 10:19
Copy link
Contributor

@marcel-rbro marcel-rbro left a 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

@mfori
Copy link
Member Author

mfori commented Dec 1, 2025

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

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.

@apify-service-account
Copy link

Preview for this PR was built for commit ce626d1a and is ready at https://pr-2111.preview.docs.apify.com!

@mfori mfori requested a review from marcel-rbro December 1, 2025 16:00
Copy link
Contributor

@marcel-rbro marcel-rbro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@mfori mfori merged commit 7284c51 into master Dec 1, 2025
10 checks passed
@mfori mfori deleted the feat/input-schema-enum-suggestion branch December 1, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-console Issues with this label are in the ownership of the console team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants