Skip to content

Commit

Permalink
TASK: Updating RAML types, Postman and OAS definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Mar 25, 2024
1 parent d6c4e8c commit d203a7e
Show file tree
Hide file tree
Showing 9 changed files with 346 additions and 159 deletions.
47 changes: 45 additions & 2 deletions oas/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8156,7 +8156,8 @@ paths:
description: |-
If the `anonymousCart` field is set on the [CustomerDraft](ctp:api:type:CustomerDraft), then the newly created Customer will be assigned to that [Cart](ctp:api:type:Cart).
Similarly, if the `anonymousId` field is set, the Customer will be set on all [Carts](ctp:api:type:Cart), [Orders](ctp:api:type:Order), [ShoppingLists](ctp:api:type:ShoppingList) and [Payments](ctp:api:type:Payment) with the same `anonymousId`.
Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message.

Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message. Simultaneously creating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.
parameters:
- name: expand
in: query
Expand Down Expand Up @@ -8413,6 +8414,8 @@ paths:
- oauth_2_0:
- "manage_customers:{projectKey}"
operationId: ByProjectKeyCustomersKeyByKeyPost
description: |-
Simultaneously updating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.
parameters:
- name: expand
in: query
Expand Down Expand Up @@ -8771,6 +8774,8 @@ paths:
- oauth_2_0:
- "manage_customers:{projectKey}"
operationId: ByProjectKeyCustomersByIDPost
description: |-
Simultaneously updating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.
parameters:
- name: expand
in: query
Expand Down Expand Up @@ -11403,7 +11408,8 @@ paths:
If the `anonymousCart` field is set on the [CustomerDraft](ctp:api:type:CustomerDraft), then the newly created Customer will be assigned to that [Cart](ctp:api:type:Cart).
Similarly, if the `anonymousId` field is set, the Customer will be set on all [Carts](ctp:api:type:Cart), [Orders](ctp:api:type:Order), [ShoppingLists](ctp:api:type:ShoppingList) and [Payments](ctp:api:type:Payment) with the same `anonymousId`.
If a Cart with a `store` field specified, the `store` field must reference the same [Store](ctp:api:type:Store) specified in the `{storeKey}` path parameter.
Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message.

Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message. Simultaneously creating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.
parameters:
- name: expand
in: query
Expand Down Expand Up @@ -11695,6 +11701,8 @@ paths:
operationId: ByProjectKeyInStoreKeyByStoreKeyCustomersKeyByKeyPost
description: |-
If the Customer exists in the Project but the `stores` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.

Simultaneously updating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.
parameters:
- name: expand
in: query
Expand Down Expand Up @@ -12096,6 +12104,8 @@ paths:
operationId: ByProjectKeyInStoreKeyByStoreKeyCustomersByIDPost
description: |-
If the Customer exists in the Project but the `stores` field references a different [Store](ctp:api:type:Store), this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.

Simultaneously updating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.
parameters:
- name: expand
in: query
Expand Down Expand Up @@ -42304,6 +42314,7 @@ components:
InvalidSubject: '#/components/schemas/InvalidSubjectError'
invalid_token: '#/components/schemas/InvalidTokenError'
LanguageUsedInStores: '#/components/schemas/LanguageUsedInStoresError'
LockedField: '#/components/schemas/LockedFieldError'
MatchingPriceNotFound: '#/components/schemas/MatchingPriceNotFoundError'
MaxCartDiscountsReached: '#/components/schemas/MaxCartDiscountsReachedError'
MaxResourceLimitExceeded: '#/components/schemas/MaxResourceLimitExceededError'
Expand Down Expand Up @@ -42692,6 +42703,23 @@ components:
type: "string"
additionalProperties:
type: "string"
LockedFieldError:
allOf:
- $ref: '#/components/schemas/ErrorObject'
- type: "object"
required:
- code
- field
- message
properties:
code:
type: "string"
message:
type: "string"
field:
type: "string"
additionalProperties:
type: "string"
MatchingPriceNotFoundError:
allOf:
- $ref: '#/components/schemas/ErrorObject'
Expand Down Expand Up @@ -43706,6 +43734,7 @@ components:
InvalidSubject: '#/components/schemas/GraphQLInvalidSubjectError'
invalid_token: '#/components/schemas/GraphQLInvalidTokenError'
LanguageUsedInStores: '#/components/schemas/GraphQLLanguageUsedInStoresError'
LockedField: '#/components/schemas/GraphQLLockedFieldError'
MatchingPriceNotFound: '#/components/schemas/GraphQLMatchingPriceNotFoundError'
MaxCartDiscountsReached: '#/components/schemas/GraphQLMaxCartDiscountsReachedError'
MaxResourceLimitExceeded: '#/components/schemas/GraphQLMaxResourceLimitExceededError'
Expand Down Expand Up @@ -44004,6 +44033,20 @@ components:
type: "string"
additionalProperties:
type: "string"
GraphQLLockedFieldError:
allOf:
- $ref: '#/components/schemas/GraphQLErrorObject'
- type: "object"
required:
- code
- field
properties:
code:
type: "string"
field:
type: "string"
additionalProperties:
type: "string"
GraphQLMatchingPriceNotFoundError:
allOf:
- $ref: '#/components/schemas/GraphQLErrorObject'
Expand Down
6 changes: 6 additions & 0 deletions uml/api/ErrorObject.puml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ interface LanguageUsedInStoresError [[LanguageUsedInStoresError.svg]] {
code: String
message: String
}
interface LockedFieldError [[LockedFieldError.svg]] {
code: String
message: String
field: String
}
interface MatchingPriceNotFoundError [[MatchingPriceNotFoundError.svg]] {
code: String
message: String
Expand Down Expand Up @@ -472,6 +477,7 @@ ErrorObject --> InvalidOperationError #blue;text:blue : "code : InvalidOperation
ErrorObject --> InvalidSubjectError #blue;text:blue : "code : InvalidSubject"
ErrorObject --> InvalidTokenError #blue;text:blue : "code : invalid_token"
ErrorObject --> LanguageUsedInStoresError #blue;text:blue : "code : LanguageUsedInStores"
ErrorObject --> LockedFieldError #blue;text:blue : "code : LockedField"
ErrorObject --> MatchingPriceNotFoundError #blue;text:blue : "code : MatchingPriceNotFound"
ErrorObject --> MaxCartDiscountsReachedError #blue;text:blue : "code : MaxCartDiscountsReached"
ErrorObject --> MaxResourceLimitExceededError #blue;text:blue : "code : MaxResourceLimitExceeded"
Expand Down
5 changes: 5 additions & 0 deletions uml/api/GraphQLErrorObject.puml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ interface GraphQLInvalidTokenError [[GraphQLInvalidTokenError.svg]] {
interface GraphQLLanguageUsedInStoresError [[GraphQLLanguageUsedInStoresError.svg]] {
code: String
}
interface GraphQLLockedFieldError [[GraphQLLockedFieldError.svg]] {
code: String
field: String
}
interface GraphQLMatchingPriceNotFoundError [[GraphQLMatchingPriceNotFoundError.svg]] {
code: String
productId: String
Expand Down Expand Up @@ -381,6 +385,7 @@ GraphQLErrorObject --> GraphQLInvalidOperationError #blue;text:blue : "code : In
GraphQLErrorObject --> GraphQLInvalidSubjectError #blue;text:blue : "code : InvalidSubject"
GraphQLErrorObject --> GraphQLInvalidTokenError #blue;text:blue : "code : invalid_token"
GraphQLErrorObject --> GraphQLLanguageUsedInStoresError #blue;text:blue : "code : LanguageUsedInStores"
GraphQLErrorObject --> GraphQLLockedFieldError #blue;text:blue : "code : LockedField"
GraphQLErrorObject --> GraphQLMatchingPriceNotFoundError #blue;text:blue : "code : MatchingPriceNotFound"
GraphQLErrorObject --> GraphQLMaxCartDiscountsReachedError #blue;text:blue : "code : MaxCartDiscountsReached"
GraphQLErrorObject --> GraphQLMaxResourceLimitExceededError #blue;text:blue : "code : MaxResourceLimitExceeded"
Expand Down
23 changes: 23 additions & 0 deletions uml/api/GraphQLLockedFieldError.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@startuml

hide empty fields
hide empty methods
legend
|= |= line |
|<back:black> </back>| inheritance |
|<back:green> </back>| property reference |
|<back:blue> </back>| discriminated class |
endlegend
interface GraphQLLockedFieldError [[GraphQLLockedFieldError.svg]] extends GraphQLErrorObject {
code: String
field: String
}
interface GraphQLErrorObject [[GraphQLErrorObject.svg]] {
code: String
}





@enduml
25 changes: 25 additions & 0 deletions uml/api/LockedFieldError.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@startuml

hide empty fields
hide empty methods
legend
|= |= line |
|<back:black> </back>| inheritance |
|<back:green> </back>| property reference |
|<back:blue> </back>| discriminated class |
endlegend
interface LockedFieldError [[LockedFieldError.svg]] extends ErrorObject {
code: String
message: String
field: String
}
interface ErrorObject [[ErrorObject.svg]] {
code: String
message: String
}





@enduml
Loading

0 comments on commit d203a7e

Please sign in to comment.