Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkout: rename client sdk data field #350

Merged
merged 1 commit into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion checkout/interfaces/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type Commerce_Checkout_PlaceOrderState_State_Redirect implements Commerce_Checko
type Commerce_Checkout_PlaceOrderState_State_TriggerClientSDK implements Commerce_Checkout_PlaceOrderState_State {
name: String!
URL: String!
Data: String!
data: String!
}

type Commerce_Checkout_PlaceOrderState_State_ShowWalletPayment implements Commerce_Checkout_PlaceOrderState_State {
Expand Down
64 changes: 19 additions & 45 deletions docs/openapi/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ var doc = `{
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cartResultError"
"$ref": "#/definitions/productResultError"
}
}
}
Expand Down Expand Up @@ -1090,36 +1090,6 @@ var doc = `{
}
},
"definitions": {
"ProductAttribute": {
"type": "object",
"properties": {
"Code": {
"description": "Code is the internal attribute identifier",
"type": "string"
},
"CodeLabel": {
"description": "CodeLabel is the human readable (perhaps localized) attribute name",
"type": "string"
},
"Label": {
"description": "Label is the human readable (perhaps localized) attribute value",
"type": "string"
},
"RawValue": {
"description": "RawValue is the untouched original value of the attribute"
},
"UnitCode": {
"description": "UnitCode is the internal code of the attribute values measuring unit",
"type": "string"
}
}
},
"ProductAttributes": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ProductAttribute"
}
},
"application.PlaceOrderPaymentInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1745,17 +1715,6 @@ var doc = `{
}
}
},
"cartResultError": {
"type": "object",
"properties": {
"Code": {
"type": "string"
},
"Message": {
"type": "string"
}
}
},
"checkoutError": {
"type": "object",
"properties": {
Expand All @@ -1771,7 +1730,7 @@ var doc = `{
"type": "object",
"properties": {
"Error": {
"$ref": "#/definitions/cartResultError"
"$ref": "#/definitions/productResultError"
},
"Product": {},
"Success": {
Expand All @@ -1794,7 +1753,7 @@ var doc = `{
},
"Error": {
"description": "Contains details if success is false",
"$ref": "#/definitions/cartResultError"
"$ref": "#/definitions/productResultError"
},
"Success": {
"type": "boolean"
Expand Down Expand Up @@ -1904,6 +1863,10 @@ var doc = `{
}
}
},
"domain.Attributes": {
"type": "object",
"additionalProperties": {}
},
"domain.Badge": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2148,7 +2111,7 @@ var doc = `{
"$ref": "#/definitions/domain.PriceInfo"
},
"Attributes": {
"$ref": "#/definitions/ProductAttributes"
"$ref": "#/definitions/domain.Attributes"
},
"AvailablePrices": {
"type": "array",
Expand Down Expand Up @@ -2356,6 +2319,17 @@ var doc = `{
}
}
},
"productResultError": {
"type": "object",
"properties": {
"Code": {
"type": "string"
},
"Message": {
"type": "string"
}
}
},
"validation.ItemValidationError": {
"type": "object",
"properties": {
Expand Down
64 changes: 19 additions & 45 deletions docs/openapi/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cartResultError"
"$ref": "#/definitions/productResultError"
}
}
}
Expand Down Expand Up @@ -1074,36 +1074,6 @@
}
},
"definitions": {
"ProductAttribute": {
"type": "object",
"properties": {
"Code": {
"description": "Code is the internal attribute identifier",
"type": "string"
},
"CodeLabel": {
"description": "CodeLabel is the human readable (perhaps localized) attribute name",
"type": "string"
},
"Label": {
"description": "Label is the human readable (perhaps localized) attribute value",
"type": "string"
},
"RawValue": {
"description": "RawValue is the untouched original value of the attribute"
},
"UnitCode": {
"description": "UnitCode is the internal code of the attribute values measuring unit",
"type": "string"
}
}
},
"ProductAttributes": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ProductAttribute"
}
},
"application.PlaceOrderPaymentInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1729,17 +1699,6 @@
}
}
},
"cartResultError": {
"type": "object",
"properties": {
"Code": {
"type": "string"
},
"Message": {
"type": "string"
}
}
},
"checkoutError": {
"type": "object",
"properties": {
Expand All @@ -1755,7 +1714,7 @@
"type": "object",
"properties": {
"Error": {
"$ref": "#/definitions/cartResultError"
"$ref": "#/definitions/productResultError"
},
"Product": {},
"Success": {
Expand All @@ -1778,7 +1737,7 @@
},
"Error": {
"description": "Contains details if success is false",
"$ref": "#/definitions/cartResultError"
"$ref": "#/definitions/productResultError"
},
"Success": {
"type": "boolean"
Expand Down Expand Up @@ -1888,6 +1847,10 @@
}
}
},
"domain.Attributes": {
"type": "object",
"additionalProperties": {}
},
"domain.Badge": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2132,7 +2095,7 @@
"$ref": "#/definitions/domain.PriceInfo"
},
"Attributes": {
"$ref": "#/definitions/ProductAttributes"
"$ref": "#/definitions/domain.Attributes"
},
"AvailablePrices": {
"type": "array",
Expand Down Expand Up @@ -2340,6 +2303,17 @@
}
}
},
"productResultError": {
"type": "object",
"properties": {
"Code": {
"type": "string"
},
"Message": {
"type": "string"
}
}
},
"validation.ItemValidationError": {
"type": "object",
"properties": {
Expand Down
48 changes: 14 additions & 34 deletions docs/openapi/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
definitions:
ProductAttribute:
properties:
Code:
description: Code is the internal attribute identifier
type: string
CodeLabel:
description: CodeLabel is the human readable (perhaps localized) attribute
name
type: string
Label:
description: Label is the human readable (perhaps localized) attribute value
type: string
RawValue:
description: RawValue is the untouched original value of the attribute
UnitCode:
description: UnitCode is the internal code of the attribute values measuring
unit
type: string
type: object
ProductAttributes:
additionalProperties:
$ref: '#/definitions/ProductAttribute'
type: object
application.PlaceOrderPaymentInfo:
properties:
Amount:
Expand Down Expand Up @@ -516,13 +493,6 @@ definitions:
Type:
type: string
type: object
cartResultError:
properties:
Code:
type: string
Message:
type: string
type: object
checkoutError:
properties:
Code:
Expand All @@ -533,7 +503,7 @@ definitions:
controller.APIResult:
properties:
Error:
$ref: '#/definitions/cartResultError'
$ref: '#/definitions/productResultError'
Product: {}
Success:
type: boolean
Expand All @@ -548,7 +518,7 @@ definitions:
DataValidationInfo:
type: object
Error:
$ref: '#/definitions/cartResultError'
$ref: '#/definitions/productResultError'
description: Contains details if success is false
Success:
type: boolean
Expand Down Expand Up @@ -620,6 +590,9 @@ definitions:
Delivery:
$ref: '#/definitions/cart.Delivery'
type: object
domain.Attributes:
additionalProperties: {}
type: object
domain.Badge:
properties:
Code:
Expand Down Expand Up @@ -789,7 +762,7 @@ definitions:
ActivePrice:
$ref: '#/definitions/domain.PriceInfo'
Attributes:
$ref: '#/definitions/ProductAttributes'
$ref: '#/definitions/domain.Attributes'
AvailablePrices:
items:
$ref: '#/definitions/domain.PriceInfo'
Expand Down Expand Up @@ -937,6 +910,13 @@ definitions:
OrderNumber:
type: string
type: object
productResultError:
properties:
Code:
type: string
Message:
type: string
type: object
validation.ItemValidationError:
properties:
ErrorMessageKey:
Expand Down Expand Up @@ -1631,7 +1611,7 @@ paths:
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cartResultError'
$ref: '#/definitions/productResultError'
summary: Get the payment status of current cart (or last placed cart)
tags:
- Payment
Expand Down
10 changes: 5 additions & 5 deletions test/integrationtest/projecttest/graphql/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type Commerce_Checkout_PlaceOrderState_State_Redirect implements Commerce_Checko
type Commerce_Checkout_PlaceOrderState_State_TriggerClientSDK implements Commerce_Checkout_PlaceOrderState_State {
name: String!
URL: String!
Data: String!
data: String!
}

type Commerce_Checkout_PlaceOrderState_State_ShowWalletPayment implements Commerce_Checkout_PlaceOrderState_State {
Expand Down