Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Update swagger documentation

Rafal Cymerysc911f56f907e
diff --git a/api/docs/v2/platform/index.yaml b/api/docs/v2/platform/index.yaml
index 81092a35fb..03b57f08a6 100644
--- a/api/docs/v2/platform/index.yaml
+++ b/api/docs/v2/platform/index.yaml
@@ -2200,6 +2200,304 @@ paths:
error: The access token is invalid
schema:
"$ref": "#/components/schemas/error"
+ "/api/v2/platform/data_feeds":
+ get:
+ summary: Return a list of Data Feeds
+ tags:
+ - Data Feeds
+ security:
+ - bearer_auth: [ ]
+ operationId: data-feeds-list
+ parameters:
+ - name: page
+ in: query
+ example: 1
+ schema:
+ type: integer
+ - name: per_page
+ in: query
+ example: 50
+ schema:
+ type: integer
+ responses:
+ '200':
+ description: Records returned
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ data:
+ - id: '1'
+ type: data_feed
+ attributes:
+ name: First Data Feed
+ type: Spree::DataFeed::Google
+ slug: e593ae1f-630a-4f77-832f-0489da1c921b
+ active: true
+ relationships:
+ store:
+ data:
+ id: '1'
+ type: store
+ - id: '2'
+ type: data_feed
+ attributes:
+ name: Second Data Feed
+ type: Spree::DataFeed::Google
+ slug: 52f060f2-76cf-4983-89a3-714419941463
+ active: true
+ relationships:
+ store:
+ data:
+ id: '1'
+ type: store
+ meta:
+ count: 2
+ total_count: 2
+ total_pages: 1
+ links:
+ self: http://www.example.com/api/v2/platform/data_feeds?page=1&per_page=
+ next: http://www.example.com/api/v2/platform/data_feeds?page=1&per_page=
+ prev: http://www.example.com/api/v2/platform/data_feeds?page=1&per_page=
+ last: http://www.example.com/api/v2/platform/data_feeds?page=1&per_page=
+ first: http://www.example.com/api/v2/platform/data_feeds?page=1&per_page=
+ schema:
+ "$ref": "#/components/schemas/resources_list"
+ '401':
+ description: Authentication Failed
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: The access token is invalid
+ schema:
+ "$ref": "#/components/schemas/error"
+ post:
+ summary: Create a Data Feed
+ tags:
+ - Data Feeds
+ security:
+ - bearer_auth: [ ]
+ description: Creates a Data Feed
+ operationId: create-data-feed
+ parameters: [ ]
+ responses:
+ '201':
+ description: Record created
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ data:
+ id: '1'
+ type: data_feed
+ attributes:
+ name: First Data Feed
+ type: Spree::DataFeed::Google
+ slug: e593ae1f-630a-4f77-832f-0489da1c921b
+ active: true
+ relationships:
+ store:
+ data:
+ id: '1'
+ type: store
+ schema:
+ "$ref": "#/components/schemas/resource"
+ '422':
+ description: Invalid request
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: Data Feed name can't be blank
+ errors:
+ name:
+ - can't be blank
+ store:
+ - can't be blank
+ type:
+ - can't be blank
+ schema:
+ "$ref": "#/components/schemas/validation_errors"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ "$ref": "#/components/schemas/create_data_feed_params"
+ "/api/v2/platform/data_feeds/{id}":
+ get:
+ summary: Return a Data Feed
+ tags:
+ - Data Feeds
+ security:
+ - bearer_auth: [ ]
+ description: Returns a Data Feed
+ operationId: show-data-feed
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Record found
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ data:
+ id: '1'
+ type: data_feed
+ attributes:
+ name: First Data Feed
+ type: Spree::DataFeed::Google
+ slug: e593ae1f-630a-4f77-832f-0489da1c921b
+ active: true
+ relationships:
+ store:
+ data:
+ id: '1'
+ type: store
+ schema:
+ "$ref": "#/components/schemas/resource"
+ '404':
+ description: Record not found
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: The resource you were looking for could not be found.
+ schema:
+ "$ref": "#/components/schemas/error"
+ '401':
+ description: Authentication Failed
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: The access token is invalid
+ schema:
+ "$ref": "#/components/schemas/error"
+ patch:
+ summary: Update a Data Feed
+ tags:
+ - Data Feeds
+ security:
+ - bearer_auth: [ ]
+ description: Updates a Data Feed
+ operationId: update-data-feed
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Record updated
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ data:
+ id: '1'
+ type: data_feed
+ attributes:
+ name: First Data Feed
+ type: Spree::DataFeed::Google
+ slug: e593ae1f-630a-4f77-832f-0489da1c921b
+ active: true
+ relationships:
+ store:
+ data:
+ id: '1'
+ type: store
+ schema:
+ "$ref": "#/components/schemas/resource"
+ '422':
+ description: Invalid request
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: Name is blank
+ errors:
+ name:
+ - is blank
+ schema:
+ "$ref": "#/components/schemas/validation_errors"
+ '404':
+ description: Record not found
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: The resource you were looking for could not be found.
+ schema:
+ "$ref": "#/components/schemas/error"
+ '401':
+ description: Authentication Failed
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: The access token is invalid
+ schema:
+ "$ref": "#/components/schemas/error"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ "$ref": "#/components/schemas/update_data_feed_params"
+ delete:
+ summary: Delete a Data Feed
+ tags:
+ - Data Feeds
+ security:
+ - bearer_auth: [ ]
+ description: Deletes a Data Feed
+ operationId: delete-data-feed
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: Record deleted
+ '404':
+ description: Record not found
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: The resource you were looking for could not be found.
+ schema:
+ "$ref": "#/components/schemas/error"
+ '401':
+ description: Authentication Failed
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ error: The access token is invalid
+ schema:
+ "$ref": "#/components/schemas/error"
"/api/v2/platform/digital_links":
get:
summary: Return a list of Digital Links
@@ -19185,6 +19483,56 @@ components:
- cms_section
title: Update a Rich Text Section
x-internal: false
+ create_data_feed_params:
+ type: object
+ properties:
+ data_feed:
+ type: object
+ required:
+ - name
+ - type
+ - store_id
+ properties:
+ name:
+ type: string
+ example: 'First data feed'
+ slug:
+ type: string
+ example: 'first-data-feed'
+ type:
+ type: string
+ example: 'Spree::DataFeed::Google'
+ store_id:
+ type: string
+ example: '1'
+ active:
+ type: boolean
+ x-internal: false
+ update_data_feed_params:
+ type: object
+ properties:
+ data_feed:
+ type: object
+ required:
+ - name
+ - type
+ - store_id
+ properties:
+ name:
+ type: string
+ example: 'First data feed'
+ slug:
+ type: string
+ example: 'first-data-feed'
+ type:
+ type: string
+ example: 'Spree::DataFeed::Google'
+ store_id:
+ type: string
+ example: '1'
+ active:
+ type: boolean
+ x-internal: false
create_digital_params:
type: object
properties:
diff --git a/api/docs/v2/storefront/index.yaml b/api/docs/v2/storefront/index.yaml
index 4db0ed4f6e..979c381e52 100644
--- a/api/docs/v2/storefront/index.yaml
+++ b/api/docs/v2/storefront/index.yaml
@@ -3022,6 +3022,9 @@ components:
type: string
example: $49.99
nullable: true
+ localized_slugs:
+ type: object
+ description: Provides product's slugs in other locales
relationships:
type: object
properties:
@@ -3524,6 +3527,9 @@ components:
updated_at:
type: string
example: '2018-06-18T10:57:29.704Z'
+ localized_slugs:
+ type: object
+ description: Provides taxon's slugs in other locales
relationships:
type: object
properties:
@@ -6367,6 +6373,10 @@ components:
display_price: $38.99
compare_at_price: null
display_compare_at_price: null
+ localized_slugs:
+ en: bomber-jacket
+ de: bomberjacke
+ fr: blouson
relationships:
variants:
data:
@@ -8733,6 +8743,10 @@ components:
is_root: false
is_child: true
is_leaf: true
+ localized_slugs:
+ en: categories/summer-sale
+ de: kategorien/sommerschlussverkauf
+ fr: categories/soldes-dete
relationships:
parent:
data: