Skip to content

Commit a8d8174

Browse files
committed
TASK: Updating RAML types, Postman and OAS definition
1 parent ab43d38 commit a8d8174

File tree

53 files changed

+571
-444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+571
-444
lines changed

oas/api/openapi.yaml

Lines changed: 68 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -49368,6 +49368,29 @@ components:
4936849368
type: "string"
4936949369
additionalProperties:
4937049370
type: "string"
49371+
BaseEvent:
49372+
type: "object"
49373+
required:
49374+
- createdAt
49375+
- data
49376+
- id
49377+
- notificationType
49378+
- resourceType
49379+
- type
49380+
properties:
49381+
id:
49382+
type: "string"
49383+
notificationType:
49384+
type: "string"
49385+
resourceType:
49386+
$ref: '#/components/schemas/EventSubscriptionResourceTypeId'
49387+
type:
49388+
$ref: '#/components/schemas/EventType'
49389+
data:
49390+
type: "object"
49391+
createdAt:
49392+
type: "string"
49393+
format: "datetime"
4937149394
Event:
4937249395
type: "object"
4937349396
discriminator:
@@ -49381,7 +49404,6 @@ components:
4938149404
ImportWaitForMasterVariant: '#/components/schemas/ImportWaitForMasterVariantEvent'
4938249405
required:
4938349406
- createdAt
49384-
- data
4938549407
- id
4938649408
- notificationType
4938749409
- resourceType
@@ -49395,8 +49417,6 @@ components:
4939549417
$ref: '#/components/schemas/EventSubscriptionResourceTypeId'
4939649418
type:
4939749419
$ref: '#/components/schemas/EventType'
49398-
data:
49399-
type: "object"
4940049420
createdAt:
4940149421
type: "string"
4940249422
format: "datetime"
@@ -49416,11 +49436,11 @@ components:
4941649436
$ref: '#/components/schemas/EventSubscriptionResourceTypeId'
4941749437
type:
4941849438
$ref: '#/components/schemas/EventType'
49419-
data:
49420-
$ref: '#/components/schemas/ImportContainerCreatedEventData'
4942149439
createdAt:
4942249440
type: "string"
4942349441
format: "datetime"
49442+
data:
49443+
$ref: '#/components/schemas/ImportContainerCreatedEventData'
4942449444
ImportContainerCreatedEventData:
4942549445
type: "object"
4942649446
required:
@@ -49456,11 +49476,11 @@ components:
4945649476
$ref: '#/components/schemas/EventSubscriptionResourceTypeId'
4945749477
type:
4945849478
$ref: '#/components/schemas/EventType'
49459-
data:
49460-
$ref: '#/components/schemas/ImportContainerDeletedEventData'
4946149479
createdAt:
4946249480
type: "string"
4946349481
format: "datetime"
49482+
data:
49483+
$ref: '#/components/schemas/ImportContainerDeletedEventData'
4946449484
ImportContainerDeletedEventData:
4946549485
type: "object"
4946649486
required:
@@ -49488,11 +49508,11 @@ components:
4948849508
$ref: '#/components/schemas/EventSubscriptionResourceTypeId'
4948949509
type:
4949049510
$ref: '#/components/schemas/EventType'
49491-
data:
49492-
$ref: '#/components/schemas/ImportOperationRejectedEventData'
4949349511
createdAt:
4949449512
type: "string"
4949549513
format: "datetime"
49514+
data:
49515+
$ref: '#/components/schemas/ImportOperationRejectedEventData'
4949649516
ImportOperationRejectedEventData:
4949749517
type: "object"
4949849518
required:
@@ -49516,11 +49536,11 @@ components:
4951649536
$ref: '#/components/schemas/EventSubscriptionResourceTypeId'
4951749537
type:
4951849538
$ref: '#/components/schemas/EventType'
49519-
data:
49520-
$ref: '#/components/schemas/ImportUnresolvedEventData'
4952149539
createdAt:
4952249540
type: "string"
4952349541
format: "datetime"
49542+
data:
49543+
$ref: '#/components/schemas/ImportUnresolvedEventData'
4952449544
ImportUnresolvedEventData:
4952549545
type: "object"
4952649546
required:
@@ -49551,11 +49571,11 @@ components:
4955149571
$ref: '#/components/schemas/EventSubscriptionResourceTypeId'
4955249572
type:
4955349573
$ref: '#/components/schemas/EventType'
49554-
data:
49555-
$ref: '#/components/schemas/ImportValidationFailedEventData'
4955649574
createdAt:
4955749575
type: "string"
4955849576
format: "datetime"
49577+
data:
49578+
$ref: '#/components/schemas/ImportValidationFailedEventData'
4955949579
ImportValidationFailedEventData:
4956049580
type: "object"
4956149581
required:
@@ -49586,11 +49606,11 @@ components:
4958649606
$ref: '#/components/schemas/EventSubscriptionResourceTypeId'
4958749607
type:
4958849608
$ref: '#/components/schemas/EventType'
49589-
data:
49590-
$ref: '#/components/schemas/ImportWaitForMasterVariantEventData'
4959149609
createdAt:
4959249610
type: "string"
4959349611
format: "datetime"
49612+
data:
49613+
$ref: '#/components/schemas/ImportWaitForMasterVariantEventData'
4959449614
ImportWaitForMasterVariantEventData:
4959549615
type: "object"
4959649616
required:
@@ -79053,20 +79073,21 @@ components:
7905379073
type:
7905479074
type: "string"
7905579075
DeliveryPayload:
79056-
type: "object"
79057-
discriminator:
79058-
propertyName: notificationType
79059-
mapping:
79060-
Event: '#/components/schemas/EventDeliveryPayload'
79061-
Message: '#/components/schemas/MessageDeliveryPayload'
79062-
ResourceCreated: '#/components/schemas/ResourceCreatedDeliveryPayload'
79063-
ResourceDeleted: '#/components/schemas/ResourceDeletedDeliveryPayload'
79064-
ResourceUpdated: '#/components/schemas/ResourceUpdatedDeliveryPayload'
79065-
required:
79066-
- notificationType
79067-
properties:
79068-
notificationType:
79069-
type: "string"
79076+
allOf:
79077+
- $ref: '#/components/schemas/SubscriptionNotification'
79078+
- type: "object"
79079+
required:
79080+
- projectKey
79081+
- resource
79082+
properties:
79083+
notificationType:
79084+
type: "string"
79085+
projectKey:
79086+
type: "string"
79087+
resource:
79088+
$ref: '#/components/schemas/Reference'
79089+
resourceUserProvidedIdentifiers:
79090+
$ref: '#/components/schemas/UserProvidedIdentifiers'
7907079091
Destination:
7907179092
type: "object"
7907279093
discriminator:
@@ -79104,7 +79125,7 @@ components:
7910479125
type: "string"
7910579126
EventDeliveryPayload:
7910679127
allOf:
79107-
- $ref: '#/components/schemas/DeliveryPayload'
79128+
- $ref: '#/components/schemas/SubscriptionNotification'
7910879129
- type: "object"
7910979130
required:
7911079131
- createdAt
@@ -79194,21 +79215,23 @@ components:
7919479215
- createdAt
7919579216
- id
7919679217
- lastModifiedAt
79197-
- projectKey
79198-
- resource
7919979218
- resourceVersion
7920079219
- sequenceNumber
7920179220
- version
7920279221
properties:
7920379222
notificationType:
7920479223
type: "string"
79224+
projectKey:
79225+
type: "string"
79226+
resource:
79227+
$ref: '#/components/schemas/Reference'
79228+
resourceUserProvidedIdentifiers:
79229+
$ref: '#/components/schemas/UserProvidedIdentifiers'
7920579230
id:
7920679231
type: "string"
7920779232
version:
7920879233
type: "integer"
7920979234
format: "int64"
79210-
projectKey:
79211-
type: "string"
7921279235
createdAt:
7921379236
type: "string"
7921479237
format: "datetime"
@@ -79221,10 +79244,6 @@ components:
7922179244
resourceVersion:
7922279245
type: "integer"
7922379246
format: "int64"
79224-
resource:
79225-
$ref: '#/components/schemas/Reference'
79226-
resourceUserProvidedIdentifiers:
79227-
$ref: '#/components/schemas/UserProvidedIdentifiers'
7922879247
payloadNotIncluded:
7922979248
$ref: '#/components/schemas/PayloadNotIncluded'
7923079249
MessageSubscription:
@@ -79320,8 +79339,6 @@ components:
7932079339
- type: "object"
7932179340
required:
7932279341
- modifiedAt
79323-
- projectKey
79324-
- resource
7932579342
- version
7932679343
properties:
7932779344
notificationType:
@@ -79344,8 +79361,6 @@ components:
7934479361
- type: "object"
7934579362
required:
7934679363
- modifiedAt
79347-
- projectKey
79348-
- resource
7934979364
- version
7935079365
properties:
7935179366
notificationType:
@@ -79371,8 +79386,6 @@ components:
7937179386
required:
7937279387
- modifiedAt
7937379388
- oldVersion
79374-
- projectKey
79375-
- resource
7937679389
- version
7937779390
properties:
7937879391
notificationType:
@@ -79536,6 +79549,17 @@ components:
7953679549
change to [Healthy](ctp:api:type:SubscriptionHealthStatus). To return your subscriptions
7953779550
to a [Healthy](ctp:api:type:SubscriptionHealthStatus) status, contact the [Composable
7953879551
Commerce support team](https://support.commercetools.com/)."
79552+
SubscriptionNotification:
79553+
type: "object"
79554+
discriminator:
79555+
propertyName: notificationType
79556+
mapping:
79557+
Event: '#/components/schemas/EventDeliveryPayload'
79558+
required:
79559+
- notificationType
79560+
properties:
79561+
notificationType:
79562+
type: "string"
7953979563
SubscriptionPagedQueryResponse:
7954079564
type: "object"
7954179565
required:

uml/api/BaseEvent.puml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@startuml
2+
3+
hide empty fields
4+
hide empty methods
5+
legend
6+
|= |= line |
7+
|<back:black> </back>| inheritance |
8+
|<back:green> </back>| property reference |
9+
|<back:blue> </back>| discriminated class |
10+
endlegend
11+
interface BaseEvent [[BaseEvent.svg]] {
12+
id: String
13+
notificationType: String
14+
resourceType: [[EventSubscriptionResourceTypeId.svg EventSubscriptionResourceTypeId]]
15+
type: [[EventType.svg EventType]]
16+
data: [[Object.svg Object]]
17+
createdAt: DateTime
18+
}
19+
20+
21+
22+
23+
24+
25+
@enduml

uml/api/DeliveryPayload.puml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,27 @@ legend
88
|<back:green> </back>| property reference |
99
|<back:blue> </back>| discriminated class |
1010
endlegend
11-
interface DeliveryPayload [[DeliveryPayload.svg]] {
11+
interface DeliveryPayload [[DeliveryPayload.svg]] extends SubscriptionNotification {
1212
notificationType: String
13+
projectKey: String
14+
resource: [[Reference.svg Reference]]
15+
resourceUserProvidedIdentifiers: [[UserProvidedIdentifiers.svg UserProvidedIdentifiers]]
1316
}
14-
15-
16-
interface EventDeliveryPayload [[EventDeliveryPayload.svg]] {
17+
interface SubscriptionNotification [[SubscriptionNotification.svg]] {
1718
notificationType: String
18-
id: String
19-
type: [[EventType.svg EventType]]
20-
resourceType: String
21-
data: [[Object.svg Object]]
22-
createdAt: DateTime
2319
}
20+
2421
interface MessageDeliveryPayload [[MessageDeliveryPayload.svg]] {
2522
notificationType: String
23+
projectKey: String
24+
resource: [[Reference.svg Reference]]
25+
resourceUserProvidedIdentifiers: [[UserProvidedIdentifiers.svg UserProvidedIdentifiers]]
2626
id: String
2727
version: Long
28-
projectKey: String
2928
createdAt: DateTime
3029
lastModifiedAt: DateTime
3130
sequenceNumber: Long
3231
resourceVersion: Long
33-
resource: [[Reference.svg Reference]]
34-
resourceUserProvidedIdentifiers: [[UserProvidedIdentifiers.svg UserProvidedIdentifiers]]
3532
payloadNotIncluded: [[PayloadNotIncluded.svg PayloadNotIncluded]]
3633
}
3734
interface ResourceCreatedDeliveryPayload [[ResourceCreatedDeliveryPayload.svg]] {
@@ -72,7 +69,6 @@ interface CloudEventsPayload [[CloudEventsPayload.svg]] {
7269
dataref: String
7370
data: [[DeliveryPayload.svg DeliveryPayload]]
7471
}
75-
DeliveryPayload --> EventDeliveryPayload #blue;text:blue : "notificationType : Event"
7672
DeliveryPayload --> MessageDeliveryPayload #blue;text:blue : "notificationType : Message"
7773
DeliveryPayload --> ResourceCreatedDeliveryPayload #blue;text:blue : "notificationType : ResourceCreated"
7874
DeliveryPayload --> ResourceDeletedDeliveryPayload #blue;text:blue : "notificationType : ResourceDeleted"

uml/api/Event.puml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ interface Event [[Event.svg]] {
1313
notificationType: String
1414
resourceType: [[EventSubscriptionResourceTypeId.svg EventSubscriptionResourceTypeId]]
1515
type: [[EventType.svg EventType]]
16-
data: [[Object.svg Object]]
1716
createdAt: DateTime
1817
}
1918

@@ -23,48 +22,48 @@ interface ImportContainerCreatedEvent [[ImportContainerCreatedEvent.svg]] {
2322
notificationType: String
2423
resourceType: [[EventSubscriptionResourceTypeId.svg EventSubscriptionResourceTypeId]]
2524
type: [[EventType.svg EventType]]
26-
data: [[ImportContainerCreatedEventData.svg ImportContainerCreatedEventData]]
2725
createdAt: DateTime
26+
data: [[ImportContainerCreatedEventData.svg ImportContainerCreatedEventData]]
2827
}
2928
interface ImportContainerDeletedEvent [[ImportContainerDeletedEvent.svg]] {
3029
id: String
3130
notificationType: String
3231
resourceType: [[EventSubscriptionResourceTypeId.svg EventSubscriptionResourceTypeId]]
3332
type: [[EventType.svg EventType]]
34-
data: [[ImportContainerDeletedEventData.svg ImportContainerDeletedEventData]]
3533
createdAt: DateTime
34+
data: [[ImportContainerDeletedEventData.svg ImportContainerDeletedEventData]]
3635
}
3736
interface ImportOperationRejectedEvent [[ImportOperationRejectedEvent.svg]] {
3837
id: String
3938
notificationType: String
4039
resourceType: [[EventSubscriptionResourceTypeId.svg EventSubscriptionResourceTypeId]]
4140
type: [[EventType.svg EventType]]
42-
data: [[ImportOperationRejectedEventData.svg ImportOperationRejectedEventData]]
4341
createdAt: DateTime
42+
data: [[ImportOperationRejectedEventData.svg ImportOperationRejectedEventData]]
4443
}
4544
interface ImportUnresolvedEvent [[ImportUnresolvedEvent.svg]] {
4645
id: String
4746
notificationType: String
4847
resourceType: [[EventSubscriptionResourceTypeId.svg EventSubscriptionResourceTypeId]]
4948
type: [[EventType.svg EventType]]
50-
data: [[ImportUnresolvedEventData.svg ImportUnresolvedEventData]]
5149
createdAt: DateTime
50+
data: [[ImportUnresolvedEventData.svg ImportUnresolvedEventData]]
5251
}
5352
interface ImportValidationFailedEvent [[ImportValidationFailedEvent.svg]] {
5453
id: String
5554
notificationType: String
5655
resourceType: [[EventSubscriptionResourceTypeId.svg EventSubscriptionResourceTypeId]]
5756
type: [[EventType.svg EventType]]
58-
data: [[ImportValidationFailedEventData.svg ImportValidationFailedEventData]]
5957
createdAt: DateTime
58+
data: [[ImportValidationFailedEventData.svg ImportValidationFailedEventData]]
6059
}
6160
interface ImportWaitForMasterVariantEvent [[ImportWaitForMasterVariantEvent.svg]] {
6261
id: String
6362
notificationType: String
6463
resourceType: [[EventSubscriptionResourceTypeId.svg EventSubscriptionResourceTypeId]]
6564
type: [[EventType.svg EventType]]
66-
data: [[ImportWaitForMasterVariantEventData.svg ImportWaitForMasterVariantEventData]]
6765
createdAt: DateTime
66+
data: [[ImportWaitForMasterVariantEventData.svg ImportWaitForMasterVariantEventData]]
6867
}
6968

7069
Event --> ImportContainerCreatedEvent #blue;text:blue : "type : ImportContainerCreated"

0 commit comments

Comments
 (0)