docs/v2/storefront/index.yaml in spree_api-4.1.15 vs docs/v2/storefront/index.yaml in spree_api-4.2.0.beta

- old
+ new

@@ -47,11 +47,92 @@ $ref: '#/components/schemas/Account' '403': $ref: '#/components/responses/403Forbidden' security: - bearerAuth: [] - + post: + description: >- + Creates a new account + + This endpoint requires [Spree Auth Devise](https://github.com/spree/spree_auth_devise) gem installed + tags: + - Account + operationId: 'Account Creation' + requestBody: + required: true + content: + application/vnd.api+json: + schema: + type: object + properties: + user: + type: object + properties: + email: + type: string + example: 'john@snow.org' + password: + type: string + example: 'spree123' + password_confirmation: + type: string + example: 'spree123' + responses: + '200': + description: ok + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Account' + '422': + description: Validation errors + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Error' + patch: + description: >- + Updates user account + + This endpoint requires [Spree Auth Devise](https://github.com/spree/spree_auth_devise) gem installed + tags: + - Account + operationId: 'Account Updates' + requestBody: + required: true + content: + application/vnd.api+json: + schema: + type: object + properties: + user: + type: object + properties: + email: + type: string + example: 'john@snow.org' + password: + type: string + example: 'spree123' + password_confirmation: + type: string + example: 'spree123' + responses: + '200': + description: ok + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Account' + '422': + description: Validation errors + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Error' + security: + - bearerAuth: [] '/account/credit_cards': get: description: >- Returns a list of Credit Cards for the signed in User tags: @@ -1123,18 +1204,10 @@ type: string example: 'USA' company: type: string example: 'Google Inc.' - AddressList: - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/Address' Cart: required: - data - included properties: @@ -1297,22 +1370,10 @@ type: string example: '10.0' display_tax_total: type: string example: '$10.00' - pre_tax_item_amount: - type: string - example: '17.00' - display_pre_tax_item_amount: - type: string - example: '$17.00' - pre_tax_total: - type: string - example: '20.00' - display_pre_tax_total: - type: string - example: '$20.00' item_count: type: number example: 2 description: 'Total quantity number of all items added to the Cart' special_instructions: @@ -1521,16 +1582,10 @@ type: string example: '125.0' display_discounted_amount: type: string example: '$125.00' - pre_tax_amount: - type: string - example: '125.0' - display_pre_tax_amount: - type: string - example: '$125.00' promo_total: type: string example: '-5.0' display_promo_total: type: string @@ -2027,14 +2082,10 @@ - $ref: '#/components/schemas/OptionValue' - $ref: '#/components/schemas/OptionType' VariantAttributes: type: object properties: - name: - type: string - example: 'Example product' - description: 'Product name' sku: type: string example: 'SKU-1001' price: type: string @@ -2062,17 +2113,9 @@ example: false description: 'Indicates if Variant is the master Variant' options_text: type: string example: 'Size: small, Color: red' - slug: - type: string - example: 'example-product' - description: 'Product slug' - description: - type: string - example: 'Example description' - description: 'Product description' purchasable: type: boolean example: true description: 'Indicates if Variant is in stock or backorderable' in_stock: