From dd059f4573a465e8316ad50f95f3a5126d7f9657 Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Wed, 10 Jan 2024 16:43:15 -0600 Subject: [PATCH 1/8] move high-level info to top --- reference/store_information.v2.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/reference/store_information.v2.yml b/reference/store_information.v2.yml index 985533056..a18a70734 100644 --- a/reference/store_information.v2.yml +++ b/reference/store_information.v2.yml @@ -8,6 +8,18 @@ info: name: BigCommerce url: 'https://www.bigcommerce.com' email: support@bigcommerce.com +servers: + - url: 'https://api.bigcommerce.com/stores/{store_hash}/v2' + variables: + store_hash: + default: store_hash + description: Permanent ID of the BigCommerce store. + description: BigCommerce API Gateway +security: + - X-Auth-Token: [] +tags: + - name: Store Information + - name: Time Zone paths: '/store': get: @@ -168,19 +180,6 @@ paths: time: 1529512970 tags: - Time Zone -tags: - - name: Store Information - - name: Time Zone -security: - - X-Auth-Token: [] - -servers: - - url: 'https://api.bigcommerce.com/stores/{store_hash}/v2' - variables: - store_hash: - default: store_hash - description: Permanent ID of the BigCommerce store. - description: BigCommerce API Gateway components: securitySchemes: X-Auth-Token: From 685a26fa87ca4110c472a1c37a76bc1e3803ee00 Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Wed, 10 Jan 2024 16:44:27 -0600 Subject: [PATCH 2/8] update potential linting confusions --- reference/store_information.v2.yml | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/reference/store_information.v2.yml b/reference/store_information.v2.yml index a18a70734..0795414fe 100644 --- a/reference/store_information.v2.yml +++ b/reference/store_information.v2.yml @@ -220,7 +220,7 @@ components: type: string domain: description: Primary domain name. - example: your-store-url.com + example: 'your-store-url.com' type: string secure_url: description: Store’s current HTTPS URL. @@ -228,10 +228,10 @@ components: type: string control_panel_base_url: type: string - example: '"https://store-abc123.mybigcommerce.com"' + example: 'https://store-abc123.mybigcommerce.com' description: The secure hostname of the control panel. name: - description: Store's name. + description: Store’s name. example: BigCommerce type: string first_name: @@ -259,7 +259,7 @@ components: type: string order_email: description: Email address for orders and fulfillment. - example: orders@emai + example: 'orders@example.com' type: string timezone: $ref: '#/components/schemas/Timezone' @@ -268,16 +268,16 @@ components: example: en type: string currency: - description: Default currency code + description: Default currency code. example: USD type: string currency_symbol: description: Default symbol for values in the currency. - example: $ + example: '$' type: string decimal_separator: description: Default decimal separator for values in the currency. - example: . + example: '.' type: string thousands_separator: description: Default thousands separator for values in the currency. @@ -307,7 +307,7 @@ components: description: The symbol that separates the whole numbers from the decimal points. example: . type: string - 'dimension_thousands_token:': + dimension_thousands_token: description: The symbol used to denote thousands. type: string plan_name: @@ -349,7 +349,7 @@ components: description: 'What type of checkout is enabled on the store. Possible values returned are optimized, single (one page), single_customizable (one page for developers), klarna.' facebook_catalog_id: type: string - description: 'Id of the facebook by meta catalog. If there is none, it returns an empty string.' + description: ID of the facebook by meta catalog. If there is none, it returns an empty string. graphql_storefront_api_enabled: type: boolean stencil_enabled: @@ -359,7 +359,7 @@ components: sitewidehttps_enabled: type: boolean example: false - description: Indicates if there is sitewide https. + description: Indicates whether there is site-wide https. multi_storefront_enabled: type: boolean description: |- @@ -389,7 +389,7 @@ components: type: object properties: name: - description: 'a string identifying the time zone, in the format: /.' + description: 'A string identifying the time zone, in the format `Continent/City`.' example: America/Chicago type: string raw_offset: @@ -412,15 +412,15 @@ components: type: object properties: display: - description: 'string that defines dates’ display format, in the pattern: M jS Y' - example: M jS Y + description: 'A string that defines dates’ display format, in the pattern `M jS Y`.' + example: 'M jS Y' type: string export: - description: 'string that defines the CSV export format for orders, customers, and products, in the pattern: M jS Y' - example: M jS Y + description: 'A string that defines the CSV export format for orders, customers, and products, in the pattern `M jS Y`.' + example: 'M jS Y' type: string extended_display: - description: 'string that defines dates’ extended-display format, in the pattern: M jS Y @ g:i A.' + description: 'A string that defines dates’ extended-display format, in the pattern `M jS Y @ g:i A`.' example: 'M jS Y @ g:i A' type: string x-internal: false From c992a5e36c8df02d66e9ecf1a91ef3d7ccbae949 Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Wed, 10 Jan 2024 16:56:09 -0600 Subject: [PATCH 3/8] remove content type header, move accept header --- reference/store_information.v2.yml | 39 +++++++++--------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/reference/store_information.v2.yml b/reference/store_information.v2.yml index 0795414fe..b61793a00 100644 --- a/reference/store_information.v2.yml +++ b/reference/store_information.v2.yml @@ -28,20 +28,7 @@ paths: tags: - Store Information parameters: - - name: Accept - in: header - required: true - description: '' - schema: - type: string - default: application/json - - name: Content-Type - in: header - required: true - description: '' - schema: - type: string - default: application/json + - $ref: '#/components/parameters/Accept' responses: '200': description: '' @@ -153,20 +140,7 @@ paths: description: Returns the system timestamp at the time of the request. The time resource is useful for validating API authentication details and testing client connections. summary: Get System Timestamp parameters: - - name: Accept - in: header - required: true - description: '' - schema: - type: string - default: application/json - - name: Content-Type - in: header - required: true - description: '' - schema: - type: string - default: application/json + - $ref: '#/components/parameters/Accept' responses: '200': description: '' @@ -434,3 +408,12 @@ components: description: Store Time in Unix format. title: timeStamp_Full x-internal: false + parameters: + Accept: + name: Accept + in: header + required: true + description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. The default is application/xml, but application/json is available when specified.' + schema: + type: string + default: application/xml From 61f7bf650ce12b4c6ef4bb01305c0193c696c74c Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Wed, 10 Jan 2024 16:56:31 -0600 Subject: [PATCH 4/8] move tags --- reference/store_information.v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/store_information.v2.yml b/reference/store_information.v2.yml index b61793a00..79a26f6de 100644 --- a/reference/store_information.v2.yml +++ b/reference/store_information.v2.yml @@ -139,6 +139,8 @@ paths: get: description: Returns the system timestamp at the time of the request. The time resource is useful for validating API authentication details and testing client connections. summary: Get System Timestamp + tags: + - Time Zone parameters: - $ref: '#/components/parameters/Accept' responses: @@ -152,8 +154,6 @@ paths: response: value: time: 1529512970 - tags: - - Time Zone components: securitySchemes: X-Auth-Token: From 9bee7da8be102024a5ed4df1f8b580879fbfed65 Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Wed, 10 Jan 2024 16:56:49 -0600 Subject: [PATCH 5/8] string stuff --- reference/store_information.v2.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/store_information.v2.yml b/reference/store_information.v2.yml index 79a26f6de..69c1cb886 100644 --- a/reference/store_information.v2.yml +++ b/reference/store_information.v2.yml @@ -42,7 +42,7 @@ paths: value: id: abc123 domain: my-awesome.store - secure_url: 'https://my-awesome.stor' + secure_url: 'https://my-awesome.store' control_panel_base_url: 'https://store-{store_hash}.mybigcommerce.com' status: live name: BigCommerce @@ -66,15 +66,15 @@ paths: extended_display: 'M jS Y @ g:i A' language: en currency: USD - currency_symbol: $ - decimal_separator: . + currency_symbol: '$' + decimal_separator: '.' thousands_separator: ',' decimal_places: 2 currency_symbol_location: left weight_units: Ounces dimension_units: Inches dimension_decimal_places: 2 - dimension_decimal_token: . + dimension_decimal_token: '.' dimension_thousands_token: ',' plan_name: Standard plan_level: Standard From 52f8b7bcb960c061d51c0753bbeebdb7bcb6c126 Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Wed, 10 Jan 2024 16:57:08 -0600 Subject: [PATCH 6/8] revise response order schema --- reference/store_information.v2.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reference/store_information.v2.yml b/reference/store_information.v2.yml index 69c1cb886..6d9b83dbd 100644 --- a/reference/store_information.v2.yml +++ b/reference/store_information.v2.yml @@ -33,10 +33,9 @@ paths: '200': description: '' content: - Time: + application/json: schema: $ref: '#/components/schemas/StoreInformation' - application/json: examples: response: value: From a19d4e577ed7d0f2294bca1790285019ad1868ce Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Wed, 10 Jan 2024 16:57:20 -0600 Subject: [PATCH 7/8] remove unused response schema --- reference/store_information.v2.yml | 47 ------------------------------ 1 file changed, 47 deletions(-) diff --git a/reference/store_information.v2.yml b/reference/store_information.v2.yml index 6d9b83dbd..cd09166a7 100644 --- a/reference/store_information.v2.yml +++ b/reference/store_information.v2.yml @@ -87,53 +87,6 @@ paths: sitewidehttps_enabled: false facebook_catalog_id: '' checkout_type: optimized - Response Schema: - examples: - response: - value: - id: nostrud pariatur incididunt - domain: consequat ut amet - secure_URL: consectetur ullamco ut Excepteur - name: id qui cupidatat anim tempor - first_name: ut dolore elit - last_name: cupidatat minim - address: tempor - country: ex cupidatat - phone: aliquip dolore pariatur - admin_email: dolor commodo elit do - order_email: ea qui - timezone: - name: 'Australia/Sydney' - raw_offset: 39600 - dst_offset: 36000 - dst_correction: true - date_format: - display: cupidatat - export: est - extended_display: cillum qui esse aliquip culpa - language: nulla commodo incididunt dolor ipsum - currency: amet in - currency_symbol: cupidatat deserunt est pariatur - decimal_separator: in consectetur nisi officia - thousands_separator: ea irure occaecat qui - decimal_places: {} - currency_symbol_location: est cupidatat - weight_units: minim adipisicing do - dimension_units: deserunt - dimension_decimal_places: 50514826 - dimension_decimal_token: deserunt est aliqua Duis - 'dimension_thousands_token:': sint voluptate esse tempor - plan_name: Ut - plan_level: pariatur ullamco veniam ad - industry: pariatur culpa est - logo: - url: aliquip in aliqua consectetur ullamco - is_price_entered_with_tax: false - features: - stencil_enabled: true - sitewidehttps_enabled: anim occaecat exercitation conse - facebook_catalog_id: aliquip sed adipisicing quis - checkout_type: qui mollit id aliqua ut '/time': get: description: Returns the system timestamp at the time of the request. The time resource is useful for validating API authentication details and testing client connections. From ec7e2ee523885ae7f7b653c5701fc62565fb575e Mon Sep 17 00:00:00 2001 From: Sarah Riehl Date: Wed, 10 Jan 2024 16:59:43 -0600 Subject: [PATCH 8/8] revise logo description per bigcommerce/api-specs/issue/1358 --- reference/store_information.v2.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/reference/store_information.v2.yml b/reference/store_information.v2.yml index cd09166a7..45a29b48a 100644 --- a/reference/store_information.v2.yml +++ b/reference/store_information.v2.yml @@ -249,11 +249,15 @@ components: example: Technology type: string logo: - type: object - properties: - url: - type: string - example: 'https://cdn8.bigcommerce.com/s-{store_hash}/product_images/screen_shot_2018-05-15_at_12.22.26_pm__05547_1529512135.png"' + description: Either an object describing the logo image, or an empty array. + anyOf: + - type: object + properties: + url: + type: string + example: 'https://cdn8.bigcommerce.com/s-{store_hash}/product_images/screen_shot_2018-05-15_at_12.22.26_pm__05547_1529512135.png' + - type: array + items: {} is_price_entered_with_tax: description: A Boolean value that indicates whether or not prices are entered with tax. example: false