Skip to content

Commit 754868e

Browse files
authored
DEVDOCS-6496 - Clarify date format for modifiers in documentation (#1080)
Updated documentation for date modifier to specify ISO-8601 ATOM format. # [DEVDOCS-6496] ## What changed? * When sending a PUT or POST request to create/update product modifier options, the full ISO-8601 ATOM format is required. * Currently, if the wrong format is provided, such as “2005-08-15”, validation should fail, but it doesn’t. ## Release notes draft * We've updated the validation workflow for creating product modifiers to require ISO-8601 ATOM format, which includes date, time, and timezone. Failing to provide dates in ISO-8601 ATOM format will now result in a validation error. ## Anything else? ping { @bigcommerce/dev-docs-team } [DEVDOCS-6496]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-6496?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 6d3ba7f commit 754868e

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

reference/catalog/product-modifiers_catalog.v3.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ info:
4343
4444
| Modifier Type(s) | Config Field | Description or Values |
4545
|-------------------------------------|-------------------------------|---------------------------------------------------------------------|
46-
| `date` | `default_value` | Default ISO date string |
46+
| `date` | `default_value` | Default ISO-8601 ATOM date string |
4747
| | `date_limited` | Boolean: Indicates whether the allowed date options are limited |
4848
| | `date_limit_mode` | Defines the type of limit on the date option. Accepts `earliest`, `range`, and `latest`. |
49-
| | `date_earliest_value` | ISO date: the earliest date allowed to be entered on the date option |
50-
| | `date_latest_value` | ISO date: the latest date allowed to be entered on the date option |
49+
| | `date_earliest_value` | ISO-8601 ATOM date: the earliest date allowed to be entered on the date option |
50+
| | `date_latest_value` | ISO-8601 ATOM date: the latest date allowed to be entered on the date option |
5151
| `checkbox` | `checked_by_default` | Boolean: Indicates whether the option is checked by default |
5252
| | `checkbox_label` | The label that appears next to the checkbox on the storefront |
5353
| `file` | `file_types_mode` | Specifies whether you want to allow shoppers to upload any file type or if you only want to accept particular types defined in the `file_types_supported` array. |
@@ -207,6 +207,8 @@ paths:
207207
208208
**Notes**
209209
It takes two separate requests to create a new checkbox modifier with option values. Perform a request to create a modifier, then perform a second request to update option values.
210+
211+
Date modifiers are required to be provided in [ISO-8601 ATOM](https://www.php.net/manual/en/class.datetimeinterface.php#datetimeinterface.constants.atom) format. Excluding them in a request will throw a server error.
210212
operationId: createProductModifier
211213
parameters:
212214
- $ref: '#/components/parameters/ContentType'
@@ -415,7 +417,10 @@ paths:
415417
tags:
416418
- Product modifiers
417419
summary: Update a product modifier
418-
description: Updates a product modifier.
420+
description: |-
421+
Updates a product modifier.
422+
423+
Date modifiers are required to be provided in [ISO-8601 ATOM](https://www.php.net/manual/en/class.datetimeinterface.php#datetimeinterface.constants.atom) format. Excluding them in a request will throw a server error.
419424
operationId: updateProductModifier
420425
parameters:
421426
- $ref: '#/components/parameters/ContentType'
@@ -460,7 +465,7 @@ paths:
460465
default_value:
461466
type: string
462467
description: |
463-
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601formatted string, or on a text option as a string. See [Configs](#configs) for more details.
468+
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601 ATOM formatted string, or on a text option as a string. See [Configs](#configs) for more details.
464469
checked_by_default:
465470
type: boolean
466471
description: |
@@ -485,12 +490,12 @@ paths:
485490
date_earliest_value:
486491
type: string
487492
description: |
488-
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
493+
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
489494
format: date
490495
date_latest_value:
491496
type: string
492497
description: |
493-
(date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
498+
(date) The latest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
494499
format: date
495500
file_types_mode:
496501
type: string
@@ -684,7 +689,7 @@ paths:
684689
default_value:
685690
type: string
686691
description: |
687-
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601formatted string, or on a text option as a string. See [Configs](#configs) for more details.
692+
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601 ATOM formatted string, or on a text option as a string. See [Configs](#configs) for more details.
688693
checked_by_default:
689694
type: boolean
690695
description: |
@@ -709,12 +714,12 @@ paths:
709714
date_earliest_value:
710715
type: string
711716
description: |
712-
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
717+
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
713718
format: date
714719
date_latest_value:
715720
type: string
716721
description: |
717-
(date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
722+
(date) The latest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
718723
format: date
719724
file_types_mode:
720725
type: string
@@ -2098,7 +2103,7 @@ components:
20982103
default_value:
20992104
type: string
21002105
description: |
2101-
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601formatted string, or on a text option as a string. See [Configs](#configs) for more details.
2106+
(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601 ATOM formatted string, or on a text option as a string. See [Configs](#configs) for more details.
21022107
checked_by_default:
21032108
type: boolean
21042109
description: |
@@ -2123,12 +2128,12 @@ components:
21232128
date_earliest_value:
21242129
type: string
21252130
description: |
2126-
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
2131+
(date) The earliest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
21272132
format: date
21282133
date_latest_value:
21292134
type: string
21302135
description: |
2131-
(date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
2136+
(date) The latest date allowed to be entered on the date option, as an ISO-8601 ATOM formatted string.
21322137
format: date
21332138
file_types_mode:
21342139
type: string

0 commit comments

Comments
 (0)