From 71c4ae1c3822ede7533bfb7e37aee77360417e58 Mon Sep 17 00:00:00 2001 From: Thomas De Meyer Date: Fri, 14 Feb 2025 11:28:57 +0100 Subject: [PATCH] feat: updated FieldInput fields --- .../unreleased/Added-20250214-112754.yaml | 3 + Taskfile.yaml | 3 +- openapi.yaml | 169 ++++++++++++----- redocly.yaml | 1 + sbmgmt/main.gen.go | 159 +++++++++++----- schemas/components.yaml | 170 +++++++++++++----- 6 files changed, 371 insertions(+), 134 deletions(-) create mode 100644 .changes/unreleased/Added-20250214-112754.yaml diff --git a/.changes/unreleased/Added-20250214-112754.yaml b/.changes/unreleased/Added-20250214-112754.yaml new file mode 100644 index 0000000..8c0aaa8 --- /dev/null +++ b/.changes/unreleased/Added-20250214-112754.yaml @@ -0,0 +1,3 @@ +kind: Added +body: Updated FieldInput with additional fields +time: 2025-02-14T11:27:54.852745844+01:00 diff --git a/Taskfile.yaml b/Taskfile.yaml index 5f3462b..3f2de19 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -3,6 +3,5 @@ version: '3' tasks: generate: cmds: - - npx @redocly/cli bundle --output openapi.yaml - - oapi-codegen -config oapi-config.yaml openapi.yaml + - npx @redocly/cli bundle --config=redocly.yaml - go generate ./... diff --git a/openapi.yaml b/openapi.yaml index 7c40d00..7dc7691 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1573,167 +1573,248 @@ components: properties: type: type: string - description: The type of the field + description: The type of your field. pos: type: integer format: int64 - description: The position of the field + description: Position of the field in the component. add_https: type: boolean - description: 'Prepends https: to stop usage of relative protocol' + description: Prepends 'https:' to avoid relative protocol issues (image/file fields). default: false allow_target_blank: type: boolean - description: Allow target blank for links in richtext + description: Allows links in richtext to open in a new tab. default: false asset_folder_id: type: integer format: int64 - description: Default asset folder numeric id to store uploaded image of that field + description: Defines the asset folder for uploaded images (asset fields). can_sync: type: boolean - description: Advanced usage to sync with field in preview + description: Allows syncing with the field in preview (advanced usage). default: false component_whitelist: type: array items: type: string - description: 'Array of component/content type names: ["post","page","product"]' + description: Array of component names that can be used in bloks, multilink, or richtext. conditional_settings: type: array - description: Array containing the object with information about conditions set on the field + description: Array containing conditional settings for the field. items: $ref: '#/components/schemas/ConditionalSettings' customize_toolbar: type: boolean - description: Customize toolbar in richtext or markdown + description: True if richtext or markdown toolbar can be customized. default: false datasource_slug: type: string - description: Define selectable datasources string; Effects editor only if source=internal + description: Defines the selectable datasource for options (internal sources). default_value: type: string - description: Default value for the field; Can be an escaped JSON object + description: Default value for the field. description: type: string - description: Description shown in the editor interface + description: The description shown in the editor interface. display_name: type: string - description: Name of the field for the editor interface + description: Name used in the editor interface. disable_time: type: boolean - description: 'Disables time selection from date picker; Default: false' + description: Disables time selection for datetime fields. default: false external_datasource: type: string - description: Define external datasource JSON Url; Effects editor only if source=external + description: Defines external datasource URL for options. field_type: type: string - description: Name of the custom field type plugin + description: Name of the custom field type plugin (custom fields). filetypes: type: array items: type: string - description: 'Array of file type names: ["images", "videos", "audios", "texts"]' + description: Array of file types for multiasset fields (e.g., images, videos). filter_content_type: type: array items: type: string - description: 'An array of content types that can be selected in a option or options field where source is internal_stories: e.g. ["post", "faq_item"]' + description: Array of content types that can be selected in an option field. folder_slug: type: string - description: 'Filter on selectable stories path; Effects editor only if source=internal_stories; In case you have a multi-language folder structure you can add the ''{0}'' placeholder and the path will be adapted dynamically. Examples: "{0}/categories/", {0}/{1}/categories/' + description: Defines a folder filter for internal stories in options. force_link_scope: type: boolean - description: Force link scope to be internal or external + description: Forces folder restrictions in multilink fields. + default: false image_crop: type: boolean - description: 'Activate force crop for images: (true/false)' + description: Activates forced image cropping (image fields). image_height: type: string - description: Define height in px or height ratio if keep_image_size is enabled + description: Defines image height in pixels or ratio (image fields). image_width: type: string - description: Define width in px or width ratio if keep_image_size is enabled + description: Defines image width in pixels or ratio (image fields). keep_image_size: type: boolean - description: 'Keep original size: (true/false)' + description: Keeps the original image size (image fields). keys: type: array items: type: string - description: Array of field keys to include in this section + description: Array of field keys for group field types. link_scope: type: string - description: 'Filter on selectable stories path; In case you have a multi-language folder structure you can add the ''{0}'' placeholder and the path will be adapted dynamically. Examples: "{0}/categories/", {0}/{1}/categories/' + description: Defines folder filtering for multilink fields. + default: false max_length: type: integer format: int64 - description: Set the max length of the input string + description: Maximum length for text, textarea, or markdown fields. maximum: type: integer format: int64 - description: Maximum amount of bloks in this field + description: Maximum number of components for bloks type fields. minimum: type: integer format: int64 - description: Minimum amount of bloks in this field + description: Minimum number of components for bloks type fields. max_options: type: integer format: int64 - description: Maximum amount of options in this field + description: Maximum options that can be selected in an options field. min_options: type: integer format: int64 - description: Minimum amount of options in this field + description: Minimum options that should be selected in an options field. no_translate: type: boolean - description: Should be excluded in translation export + description: Excludes the field from translation export (for text and number types). options: type: array - description: Array of datasource entries [{name:"", value:""}]; Effects editor only if source=undefined + description: Array of data source entries for option fields. items: $ref: '#/components/schemas/FieldOption' toolbar: type: array items: type: string - description: Array of toolbar options + description: Array of enabled items when customizing the toolbar for richtext/markdown. tooltip: type: boolean - description: Show the description as a tooltip + description: True if description is shown as a tooltip. default: false regex: type: string - description: Client Regex validation for the field + description: Regex validation for text fields. required: type: boolean - description: 'Is field required; Default: false' + description: Is this field required? default: false restrict_components: type: boolean - description: 'Activate restriction nestable component option; Default: false' + description: Enables restriction for nestable components in bloks (for bloks and richtext). default: false restrict_content_types: type: boolean - description: Activate restriction content type option + description: Activates restriction for content types in multilink fields. rich_markdown: type: boolean - description: Enable rich markdown view by default (true/false) + description: Enables rich markdown view for markdown fields. rtl: type: boolean - description: Enable global RTL for this field + description: Enables RTL for markdown, text, or textarea fields. source: type: string - description: 'Possible values: undefined: Self; internal_stories: Stories; internal: Datasource; external: API Endpoint in Datasource Entries Array Format' + description: Defines where options are sourced from (e.g., internal stories, external APIs). translatable: type: boolean - description: 'Can field be translated; Default: false' + description: True if translation is enabled over the field. default: false use_uuid: type: boolean - description: 'Default: true; available in option and source=internal_stories' + description: Specifies if UUID should be used in options. default: true + restrict_type: + type: string + description: Restricts the type of components used in bloks fields (e.g., tags, groups). + component_tag_whitelist: + type: array + items: + type: integer + description: Array of tag IDs for restricting components in bloks fields. + component_group_whitelist: + type: array + items: + type: string + description: Array of group UUIDs for restricting components in bloks fields. + style_options: + type: array + items: + type: object + description: Custom CSS data for richtext fields. + allow_custom_attributes: + type: boolean + description: Enables custom attributes in links for richtext or multilink fields. + allow_multiline: + type: boolean + description: Enables empty paragraphs in markdown fields. + min_value: + type: integer + description: Minimum value for number fields. + max_value: + type: integer + description: Maximum value for number fields. + decimals: + type: integer + description: Number of decimal places for number fields. + steps: + type: integer + description: Step interval for number fields. + inline_label: + type: boolean + description: Makes the label of a boolean field inline. + exclude_empty_option: + type: boolean + description: Hides empty options in option fields. + entry_appearance: + type: string + description: Appearance of an option (link or card) in an option field. + default: link + allow_advanced_search: + type: boolean + description: Allows advanced search in option fields. + is_reference_type: + type: boolean + description: True if the options field is of type reference. + allow_external_url: + type: boolean + description: Allows external URLs in asset or multiasset fields. + email_link_type: + type: boolean + description: Allows emails in multilink fields. + default: false + asset_link_type: + type: boolean + description: Allows assets in multilink fields. + default: false + show_anchor: + type: boolean + description: Enables anchor field for internal links in multilink fields. + default: false + required_fields: + type: string + description: Comma-separated list of required fields for custom fields. + exclude_from_merge: + type: boolean + description: Excludes a blok from merge actions (Dimensions App). + exclude_from_overwrite: + type: boolean + description: Excludes a blok from overwrite actions (Dimensions App). + force_merge: + type: boolean + description: Forces overwriting a blok during a merge action (Dimensions App). required: - type - pos diff --git a/redocly.yaml b/redocly.yaml index cb09033..4a5fd19 100644 --- a/redocly.yaml +++ b/redocly.yaml @@ -1,5 +1,6 @@ apis: storyblok@latest: root: "source.yaml" + output: openapi.yaml extends: - recommended diff --git a/sbmgmt/main.gen.go b/sbmgmt/main.gen.go index 045ab8d..889314c 100644 --- a/sbmgmt/main.gen.go +++ b/sbmgmt/main.gen.go @@ -387,134 +387,205 @@ type DatasourceUpdateInput = DatasourceCreateInput // FieldInput defines model for FieldInput. type FieldInput struct { - // AddHttps Prepends https: to stop usage of relative protocol + // AddHttps Prepends 'https:' to avoid relative protocol issues (image/file fields). AddHttps *bool `json:"add_https,omitempty"` - // AllowTargetBlank Allow target blank for links in richtext + // AllowAdvancedSearch Allows advanced search in option fields. + AllowAdvancedSearch *bool `json:"allow_advanced_search,omitempty"` + + // AllowCustomAttributes Enables custom attributes in links for richtext or multilink fields. + AllowCustomAttributes *bool `json:"allow_custom_attributes,omitempty"` + + // AllowExternalUrl Allows external URLs in asset or multiasset fields. + AllowExternalUrl *bool `json:"allow_external_url,omitempty"` + + // AllowMultiline Enables empty paragraphs in markdown fields. + AllowMultiline *bool `json:"allow_multiline,omitempty"` + + // AllowTargetBlank Allows links in richtext to open in a new tab. AllowTargetBlank *bool `json:"allow_target_blank,omitempty"` - // AssetFolderId Default asset folder numeric id to store uploaded image of that field + // AssetFolderId Defines the asset folder for uploaded images (asset fields). AssetFolderId *int64 `json:"asset_folder_id,omitempty"` - // CanSync Advanced usage to sync with field in preview + // AssetLinkType Allows assets in multilink fields. + AssetLinkType *bool `json:"asset_link_type,omitempty"` + + // CanSync Allows syncing with the field in preview (advanced usage). CanSync *bool `json:"can_sync,omitempty"` - // ComponentWhitelist Array of component/content type names: ["post","page","product"] + // ComponentGroupWhitelist Array of group UUIDs for restricting components in bloks fields. + ComponentGroupWhitelist *[]string `json:"component_group_whitelist,omitempty"` + + // ComponentTagWhitelist Array of tag IDs for restricting components in bloks fields. + ComponentTagWhitelist *[]int `json:"component_tag_whitelist,omitempty"` + + // ComponentWhitelist Array of component names that can be used in bloks, multilink, or richtext. ComponentWhitelist *[]string `json:"component_whitelist,omitempty"` - // ConditionalSettings Array containing the object with information about conditions set on the field + // ConditionalSettings Array containing conditional settings for the field. ConditionalSettings *[]ConditionalSettings `json:"conditional_settings,omitempty"` - // CustomizeToolbar Customize toolbar in richtext or markdown + // CustomizeToolbar True if richtext or markdown toolbar can be customized. CustomizeToolbar *bool `json:"customize_toolbar,omitempty"` - // DatasourceSlug Define selectable datasources string; Effects editor only if source=internal + // DatasourceSlug Defines the selectable datasource for options (internal sources). DatasourceSlug *string `json:"datasource_slug,omitempty"` - // DefaultValue Default value for the field; Can be an escaped JSON object + // Decimals Number of decimal places for number fields. + Decimals *int `json:"decimals,omitempty"` + + // DefaultValue Default value for the field. DefaultValue *string `json:"default_value,omitempty"` - // Description Description shown in the editor interface + // Description The description shown in the editor interface. Description *string `json:"description,omitempty"` - // DisableTime Disables time selection from date picker; Default: false + // DisableTime Disables time selection for datetime fields. DisableTime *bool `json:"disable_time,omitempty"` - // DisplayName Name of the field for the editor interface + // DisplayName Name used in the editor interface. DisplayName *string `json:"display_name,omitempty"` - // ExternalDatasource Define external datasource JSON Url; Effects editor only if source=external + // EmailLinkType Allows emails in multilink fields. + EmailLinkType *bool `json:"email_link_type,omitempty"` + + // EntryAppearance Appearance of an option (link or card) in an option field. + EntryAppearance *string `json:"entry_appearance,omitempty"` + + // ExcludeEmptyOption Hides empty options in option fields. + ExcludeEmptyOption *bool `json:"exclude_empty_option,omitempty"` + + // ExcludeFromMerge Excludes a blok from merge actions (Dimensions App). + ExcludeFromMerge *bool `json:"exclude_from_merge,omitempty"` + + // ExcludeFromOverwrite Excludes a blok from overwrite actions (Dimensions App). + ExcludeFromOverwrite *bool `json:"exclude_from_overwrite,omitempty"` + + // ExternalDatasource Defines external datasource URL for options. ExternalDatasource *string `json:"external_datasource,omitempty"` - // FieldType Name of the custom field type plugin + // FieldType Name of the custom field type plugin (custom fields). FieldType *string `json:"field_type,omitempty"` - // Filetypes Array of file type names: ["images", "videos", "audios", "texts"] - Filetypes *[]string `json:"filetypes,omitempty"` + // Filetypes Array of file types for multiasset fields (e.g., images, videos). + Filetypes *[]string `json:"filetypes,omitempty"` + + // FilterContentType Array of content types that can be selected in an option field. FilterContentType *[]string `json:"filter_content_type,omitempty"` - // FolderSlug Filter on selectable stories path; Effects editor only if source=internal_stories; In case you have a multi-language folder structure you can add the '{0}' placeholder and the path will be adapted dynamically. Examples: "{0}/categories/", {0}/{1}/categories/ + // FolderSlug Defines a folder filter for internal stories in options. FolderSlug *string `json:"folder_slug,omitempty"` - // ForceLinkScope Force link scope to be internal or external + // ForceLinkScope Forces folder restrictions in multilink fields. ForceLinkScope *bool `json:"force_link_scope,omitempty"` - // ImageCrop Activate force crop for images: (true/false) + // ForceMerge Forces overwriting a blok during a merge action (Dimensions App). + ForceMerge *bool `json:"force_merge,omitempty"` + + // ImageCrop Activates forced image cropping (image fields). ImageCrop *bool `json:"image_crop,omitempty"` - // ImageHeight Define height in px or height ratio if keep_image_size is enabled + // ImageHeight Defines image height in pixels or ratio (image fields). ImageHeight *string `json:"image_height,omitempty"` - // ImageWidth Define width in px or width ratio if keep_image_size is enabled + // ImageWidth Defines image width in pixels or ratio (image fields). ImageWidth *string `json:"image_width,omitempty"` - // KeepImageSize Keep original size: (true/false) + // InlineLabel Makes the label of a boolean field inline. + InlineLabel *bool `json:"inline_label,omitempty"` + + // IsReferenceType True if the options field is of type reference. + IsReferenceType *bool `json:"is_reference_type,omitempty"` + + // KeepImageSize Keeps the original image size (image fields). KeepImageSize *bool `json:"keep_image_size,omitempty"` - // Keys Array of field keys to include in this section + // Keys Array of field keys for group field types. Keys *[]string `json:"keys,omitempty"` - // LinkScope Filter on selectable stories path; In case you have a multi-language folder structure you can add the '{0}' placeholder and the path will be adapted dynamically. Examples: "{0}/categories/", {0}/{1}/categories/ + // LinkScope Defines folder filtering for multilink fields. LinkScope *string `json:"link_scope,omitempty"` - // MaxLength Set the max length of the input string + // MaxLength Maximum length for text, textarea, or markdown fields. MaxLength *int64 `json:"max_length,omitempty"` - // MaxOptions Maximum amount of options in this field + // MaxOptions Maximum options that can be selected in an options field. MaxOptions *int64 `json:"max_options,omitempty"` - // Maximum Maximum amount of bloks in this field + // MaxValue Maximum value for number fields. + MaxValue *int `json:"max_value,omitempty"` + + // Maximum Maximum number of components for bloks type fields. Maximum *int64 `json:"maximum,omitempty"` - // MinOptions Minimum amount of options in this field + // MinOptions Minimum options that should be selected in an options field. MinOptions *int64 `json:"min_options,omitempty"` - // Minimum Minimum amount of bloks in this field + // MinValue Minimum value for number fields. + MinValue *int `json:"min_value,omitempty"` + + // Minimum Minimum number of components for bloks type fields. Minimum *int64 `json:"minimum,omitempty"` - // NoTranslate Should be excluded in translation export + // NoTranslate Excludes the field from translation export (for text and number types). NoTranslate *bool `json:"no_translate,omitempty"` - // Options Array of datasource entries [{name:"", value:""}]; Effects editor only if source=undefined + // Options Array of data source entries for option fields. Options *[]FieldOption `json:"options,omitempty"` - // Pos The position of the field + // Pos Position of the field in the component. Pos int64 `json:"pos"` - // Regex Client Regex validation for the field + // Regex Regex validation for text fields. Regex *string `json:"regex,omitempty"` - // Required Is field required; Default: false + // Required Is this field required? Required *bool `json:"required,omitempty"` - // RestrictComponents Activate restriction nestable component option; Default: false + // RequiredFields Comma-separated list of required fields for custom fields. + RequiredFields *string `json:"required_fields,omitempty"` + + // RestrictComponents Enables restriction for nestable components in bloks (for bloks and richtext). RestrictComponents *bool `json:"restrict_components,omitempty"` - // RestrictContentTypes Activate restriction content type option + // RestrictContentTypes Activates restriction for content types in multilink fields. RestrictContentTypes *bool `json:"restrict_content_types,omitempty"` - // RichMarkdown Enable rich markdown view by default (true/false) + // RestrictType Restricts the type of components used in bloks fields (e.g., tags, groups). + RestrictType *string `json:"restrict_type,omitempty"` + + // RichMarkdown Enables rich markdown view for markdown fields. RichMarkdown *bool `json:"rich_markdown,omitempty"` - // Rtl Enable global RTL for this field + // Rtl Enables RTL for markdown, text, or textarea fields. Rtl *bool `json:"rtl,omitempty"` - // Source Possible values: undefined: Self; internal_stories: Stories; internal: Datasource; external: API Endpoint in Datasource Entries Array Format + // ShowAnchor Enables anchor field for internal links in multilink fields. + ShowAnchor *bool `json:"show_anchor,omitempty"` + + // Source Defines where options are sourced from (e.g., internal stories, external APIs). Source *string `json:"source,omitempty"` - // Toolbar Array of toolbar options + // Steps Step interval for number fields. + Steps *int `json:"steps,omitempty"` + + // StyleOptions Custom CSS data for richtext fields. + StyleOptions *[]map[string]interface{} `json:"style_options,omitempty"` + + // Toolbar Array of enabled items when customizing the toolbar for richtext/markdown. Toolbar *[]string `json:"toolbar,omitempty"` - // Tooltip Show the description as a tooltip + // Tooltip True if description is shown as a tooltip. Tooltip *bool `json:"tooltip,omitempty"` - // Translatable Can field be translated; Default: false + // Translatable True if translation is enabled over the field. Translatable *bool `json:"translatable,omitempty"` - // Type The type of the field + // Type The type of your field. Type string `json:"type"` - // UseUuid Default: true; available in option and source=internal_stories + // UseUuid Specifies if UUID should be used in options. UseUuid *bool `json:"use_uuid,omitempty"` } diff --git a/schemas/components.yaml b/schemas/components.yaml index b93c9f7..4ff8193 100644 --- a/schemas/components.yaml +++ b/schemas/components.yaml @@ -138,167 +138,249 @@ FieldInput: properties: type: type: string - description: The type of the field + description: The type of your field. pos: type: integer format: int64 - description: The position of the field + description: Position of the field in the component. add_https: type: boolean - description: "Prepends https: to stop usage of relative protocol" + description: Prepends 'https:' to avoid relative protocol issues (image/file fields). default: false allow_target_blank: type: boolean - description: "Allow target blank for links in richtext" + description: Allows links in richtext to open in a new tab. default: false asset_folder_id: type: integer format: int64 - description: "Default asset folder numeric id to store uploaded image of that field" + description: Defines the asset folder for uploaded images (asset fields). can_sync: type: boolean - description: "Advanced usage to sync with field in preview" + description: Allows syncing with the field in preview (advanced usage). default: false component_whitelist: type: array items: type: string - description: 'Array of component/content type names: ["post","page","product"]' + description: Array of component names that can be used in bloks, multilink, or richtext. conditional_settings: type: array - description: "Array containing the object with information about conditions set on the field" + description: Array containing conditional settings for the field. items: $ref: "#/ConditionalSettings" customize_toolbar: type: boolean - description: "Customize toolbar in richtext or markdown" + description: True if richtext or markdown toolbar can be customized. default: false datasource_slug: type: string - description: "Define selectable datasources string; Effects editor only if source=internal" + description: Defines the selectable datasource for options (internal sources). default_value: type: string - description: "Default value for the field; Can be an escaped JSON object" + description: Default value for the field. description: type: string - description: "Description shown in the editor interface" + description: The description shown in the editor interface. display_name: type: string - description: "Name of the field for the editor interface" + description: Name used in the editor interface. disable_time: type: boolean - description: "Disables time selection from date picker; Default: false" + description: Disables time selection for datetime fields. default: false external_datasource: type: string - description: "Define external datasource JSON Url; Effects editor only if source=external" + description: Defines external datasource URL for options. field_type: type: string - description: "Name of the custom field type plugin" + description: Name of the custom field type plugin (custom fields). filetypes: type: array items: type: string - description: 'Array of file type names: ["images", "videos", "audios", "texts"]' + description: Array of file types for multiasset fields (e.g., images, videos). filter_content_type: type: array items: type: string - description: 'An array of content types that can be selected in a option or options field where source is internal_stories: e.g. ["post", "faq_item"]' + description: Array of content types that can be selected in an option field. folder_slug: type: string - description: 'Filter on selectable stories path; Effects editor only if source=internal_stories; In case you have a multi-language folder structure you can add the ''{0}'' placeholder and the path will be adapted dynamically. Examples: "{0}/categories/", {0}/{1}/categories/' + description: Defines a folder filter for internal stories in options. force_link_scope: type: boolean - description: "Force link scope to be internal or external" + description: Forces folder restrictions in multilink fields. + default: false image_crop: type: boolean - description: "Activate force crop for images: (true/false)" + description: Activates forced image cropping (image fields). image_height: type: string - description: "Define height in px or height ratio if keep_image_size is enabled" + description: Defines image height in pixels or ratio (image fields). image_width: type: string - description: "Define width in px or width ratio if keep_image_size is enabled" + description: Defines image width in pixels or ratio (image fields). keep_image_size: type: boolean - description: "Keep original size: (true/false)" + description: Keeps the original image size (image fields). keys: type: array items: type: string - description: "Array of field keys to include in this section" + description: Array of field keys for group field types. link_scope: type: string - description: 'Filter on selectable stories path; In case you have a multi-language folder structure you can add the ''{0}'' placeholder and the path will be adapted dynamically. Examples: "{0}/categories/", {0}/{1}/categories/' + description: Defines folder filtering for multilink fields. + default: false max_length: type: integer format: int64 - description: "Set the max length of the input string" + description: Maximum length for text, textarea, or markdown fields. maximum: type: integer format: int64 - description: "Maximum amount of bloks in this field" + description: Maximum number of components for bloks type fields. minimum: type: integer format: int64 - description: "Minimum amount of bloks in this field" + description: Minimum number of components for bloks type fields. max_options: type: integer format: int64 - description: "Maximum amount of options in this field" + description: Maximum options that can be selected in an options field. min_options: type: integer format: int64 - description: "Minimum amount of options in this field" + description: Minimum options that should be selected in an options field. no_translate: type: boolean - description: "Should be excluded in translation export" + description: Excludes the field from translation export (for text and number types). options: type: array - description: 'Array of datasource entries [{name:"", value:""}]; Effects editor only if source=undefined' + description: Array of data source entries for option fields. items: $ref: "#/FieldOption" toolbar: type: array items: type: string - description: "Array of toolbar options" + description: Array of enabled items when customizing the toolbar for richtext/markdown. tooltip: type: boolean - description: "Show the description as a tooltip" + description: True if description is shown as a tooltip. default: false regex: type: string - description: "Client Regex validation for the field" + description: Regex validation for text fields. required: type: boolean - description: "Is field required; Default: false" + description: Is this field required? default: false restrict_components: type: boolean - description: "Activate restriction nestable component option; Default: false" + description: Enables restriction for nestable components in bloks (for bloks and richtext). default: false restrict_content_types: type: boolean - description: "Activate restriction content type option" + description: Activates restriction for content types in multilink fields. rich_markdown: type: boolean - description: "Enable rich markdown view by default (true/false)" + description: Enables rich markdown view for markdown fields. rtl: type: boolean - description: "Enable global RTL for this field" + description: Enables RTL for markdown, text, or textarea fields. source: type: string - description: "Possible values: undefined: Self; internal_stories: Stories; internal: Datasource; external: API Endpoint in Datasource Entries Array Format" + description: Defines where options are sourced from (e.g., internal stories, external APIs). translatable: type: boolean - description: "Can field be translated; Default: false" + description: True if translation is enabled over the field. default: false use_uuid: type: boolean - description: "Default: true; available in option and source=internal_stories" + description: Specifies if UUID should be used in options. default: true + restrict_type: + type: string + description: Restricts the type of components used in bloks fields (e.g., tags, + groups). + component_tag_whitelist: + type: array + items: + type: integer + description: Array of tag IDs for restricting components in bloks fields. + component_group_whitelist: + type: array + items: + type: string + description: Array of group UUIDs for restricting components in bloks fields. + style_options: + type: array + items: + type: object + description: Custom CSS data for richtext fields. + allow_custom_attributes: + type: boolean + description: Enables custom attributes in links for richtext or multilink fields. + allow_multiline: + type: boolean + description: Enables empty paragraphs in markdown fields. + min_value: + type: integer + description: Minimum value for number fields. + max_value: + type: integer + description: Maximum value for number fields. + decimals: + type: integer + description: Number of decimal places for number fields. + steps: + type: integer + description: Step interval for number fields. + inline_label: + type: boolean + description: Makes the label of a boolean field inline. + exclude_empty_option: + type: boolean + description: Hides empty options in option fields. + entry_appearance: + type: string + description: Appearance of an option (link or card) in an option field. + default: link + allow_advanced_search: + type: boolean + description: Allows advanced search in option fields. + is_reference_type: + type: boolean + description: True if the options field is of type reference. + allow_external_url: + type: boolean + description: Allows external URLs in asset or multiasset fields. + email_link_type: + type: boolean + description: Allows emails in multilink fields. + default: false + asset_link_type: + type: boolean + description: Allows assets in multilink fields. + default: false + show_anchor: + type: boolean + description: Enables anchor field for internal links in multilink fields. + default: false + required_fields: + type: string + description: Comma-separated list of required fields for custom fields. + exclude_from_merge: + type: boolean + description: Excludes a blok from merge actions (Dimensions App). + exclude_from_overwrite: + type: boolean + description: Excludes a blok from overwrite actions (Dimensions App). + force_merge: + type: boolean + description: Forces overwriting a blok during a merge action (Dimensions App). required: - type - pos