io.zenwave360.sdk.resources.asyncapi.v2.asyncapi-orders-relational.yml Maven / Gradle / Ivy
asyncapi: 2.4.0
info:
title: Zenwave 360 Generated API
version: 0.0.1
defaultContentType: application/json
tags:
- name: "Default"
- name: "Customer"
- name: "CustomerOrder"
channels:
customer.requests:
subscribe:
summary: Customer Async Requests
operationId: doCustomerRequest
tags:
- name: Customer
message:
$ref: "#/components/messages/CustomerRequestMessage"
customer.events:
publish:
summary: Customer Domain Events
operationId: onCustomerEvent
tags:
- name: Customer
message:
$ref: "#/components/messages/CustomerEventMessage"
customer-order.requests:
subscribe:
summary: CustomerOrder Async Requests
operationId: doCustomerOrderRequest
tags:
- name: CustomerOrder
message:
$ref: "#/components/messages/CustomerOrderRequestMessage"
customer-order.events:
publish:
summary: CustomerOrder Domain Events
operationId: onCustomerOrderEvent
tags:
- name: CustomerOrder
message:
$ref: "#/components/messages/CustomerOrderEventMessage"
shipping-details.requests:
subscribe:
summary: ShippingDetails Async Requests
operationId: doShippingDetailsRequest
tags:
- name: Customer
message:
$ref: "#/components/messages/ShippingDetailsRequestMessage"
shipping-details.events:
publish:
summary: ShippingDetails Domain Events
operationId: onShippingDetailsEvent
tags:
- name: Customer
message:
$ref: "#/components/messages/ShippingDetailsEventMessage"
payment-details.requests:
subscribe:
summary: PaymentDetails Async Requests
operationId: doPaymentDetailsRequest
tags:
- name: Customer
message:
$ref: "#/components/messages/PaymentDetailsRequestMessage"
payment-details.events:
publish:
summary: PaymentDetails Domain Events
operationId: onPaymentDetailsEvent
tags:
- name: Customer
message:
$ref: "#/components/messages/PaymentDetailsEventMessage"
components:
messages:
CustomerRequestMessage:
messageId: CustomerRequestMessage
name: CustomerRequestMessage
title: Async Command/Request for a Customer
summary: Async Command/Request for a Customer
schemaFormat: application/vnd.aai.asyncapi;version=2.4.0
payload:
$ref: "#/components/schemas/CustomerRequestPayload"
CustomerEventMessage:
name: CustomerEventMessage
messageId: CustomerEventMessage
title: Message for a Customer Event
summary: Message for a Customer Event
schemaFormat: application/vnd.aai.asyncapi;version=2.4.0
headers:
$ref: "#/components/headers/CustomerHeaders"
payload:
$ref: "#/components/schemas/CustomerEventPayload"
CustomerOrderRequestMessage:
messageId: CustomerOrderRequestMessage
name: CustomerOrderRequestMessage
title: Async Command/Request for a CustomerOrder
summary: Async Command/Request for a CustomerOrder
schemaFormat: application/vnd.aai.asyncapi;version=2.4.0
payload:
$ref: "#/components/schemas/CustomerOrderRequestPayload"
CustomerOrderEventMessage:
name: CustomerOrderEventMessage
messageId: CustomerOrderEventMessage
title: Message for a CustomerOrder Event
summary: Message for a CustomerOrder Event
schemaFormat: application/vnd.aai.asyncapi;version=2.4.0
payload:
$ref: "#/components/schemas/CustomerOrderEventPayload"
ShippingDetailsRequestMessage:
messageId: ShippingDetailsRequestMessage
name: ShippingDetailsRequestMessage
title: Async Command/Request for a ShippingDetails
summary: Async Command/Request for a ShippingDetails
schemaFormat: application/vnd.aai.asyncapi;version=2.4.0
payload:
$ref: "#/components/schemas/ShippingDetailsRequestPayload"
ShippingDetailsEventMessage:
name: ShippingDetailsEventMessage
messageId: ShippingDetailsEventMessage
title: Message for a ShippingDetails Event
summary: Message for a ShippingDetails Event
schemaFormat: application/vnd.aai.asyncapi;version=2.4.0
payload:
$ref: "#/components/schemas/ShippingDetailsEventPayload"
PaymentDetailsRequestMessage:
messageId: PaymentDetailsRequestMessage
name: PaymentDetailsRequestMessage
title: Async Command/Request for a PaymentDetails
summary: Async Command/Request for a PaymentDetails
schemaFormat: application/vnd.aai.asyncapi;version=2.4.0
payload:
$ref: "#/components/schemas/PaymentDetailsRequestPayload"
PaymentDetailsEventMessage:
name: PaymentDetailsEventMessage
messageId: PaymentDetailsEventMessage
title: Message for a PaymentDetails Event
summary: Message for a PaymentDetails Event
schemaFormat: application/vnd.aai.asyncapi;version=2.4.0
payload:
$ref: "#/components/schemas/PaymentDetailsEventPayload"
headers:
CustomerHeaders:
type: object
properties:
entity-id:
type: string
description: Customer Entity Id
x-runtime-expression: $message.payload#/customer/id
schemas:
Customer:
type: "object"
x-business-entity: "Customer"
required:
- "firstName"
- "lastName"
- "password"
- "email"
- "username"
properties:
id:
type: "string"
firstName:
type: "string"
minLength: 3
maxLength: 250
lastName:
type: "string"
minLength: 3
maxLength: 250
password:
type: "string"
minLength: 3
maxLength: 250
email:
type: "string"
minLength: 3
maxLength: 250
username:
type: "string"
minLength: 3
maxLength: 250
CustomerOrder:
type: "object"
x-business-entity: "CustomerOrder"
properties:
id:
type: "string"
date:
type: "string"
format: "date-time"
shippingDetails:
$ref: "#/components/schemas/OrderShippingDetails"
description: "Shipping Details are stored embedded so they don't change\
\ if the original shipping address changes"
status:
$ref: "#/components/schemas/OrderStatus"
orderedItems:
type: "array"
items:
$ref: "#/components/schemas/OrderedItem"
customerId:
type: "string"
customer:
$ref: "#/components/schemas/Customer"
paymentDetailsId:
type: "string"
paymentDetails:
$ref: "#/components/schemas/PaymentDetails"
ShippingDetails:
type: "object"
x-business-entity: "ShippingDetails"
properties:
id:
type: "string"
phone:
type: "string"
address:
type: "string"
customerId:
type: "string"
customer:
$ref: "#/components/schemas/Customer"
BaseEntity:
type: "object"
x-business-entity: "BaseEntity"
properties:
id:
type: "string"
CustomerOrderSearchCriteria:
type: "object"
x-business-entity: "CustomerOrderSearchCriteria"
properties:
id:
type: "string"
dateFrom:
type: "string"
format: "date-time"
dateTo:
type: "string"
format: "date-time"
status:
$ref: "#/components/schemas/OrderStatus"
PaymentDetails:
type: "object"
x-business-entity: "PaymentDetails"
properties:
id:
type: "string"
cardHolderName:
type: "string"
creditCardNumber:
type: "string"
customerId:
type: "string"
customer:
$ref: "#/components/schemas/Customer"
OrderedItem:
type: "object"
x-business-entity: "OrderedItem"
required:
- "name"
- "price"
properties:
id:
type: "string"
catalogItemId:
type: "integer"
format: "int64"
name:
type: "string"
minLength: 3
maxLength: 250
quantity:
type: "integer"
format: "int32"
price:
type: "number"
format: "double"
CustomerCriteria:
type: "object"
x-business-entity: "CustomerCriteria"
properties:
id:
type: "string"
firstName:
type: "string"
lastName:
type: "string"
password:
type: "string"
email:
type: "string"
username:
type: "string"
OrderShippingDetails:
type: "object"
x-business-entity: "OrderShippingDetails"
properties:
address:
type: "string"
phone:
type: "string"
OrderStatus:
type: "string"
x-business-entity: "OrderStatus"
enum:
- "CONFIRMED"
- "DELIVERED"
- "SHIPPED"
CustomerRequestPayload:
type: object
properties:
customerId:
type: string
requestType:
type: string
enum:
- "create"
- "update"
- "delete"
customer:
$ref: "#/components/schemas/Customer"
CustomerEventPayload:
type: object
properties:
customerId:
type: string
eventType:
type: string
enum:
- "created"
- "updated"
- "deleted"
customer:
$ref: "#/components/schemas/Customer"
CustomerOrderRequestPayload:
type: object
properties:
customerOrderId:
type: string
requestType:
type: string
enum:
- "create"
- "update"
- "delete"
customerOrder:
$ref: "#/components/schemas/CustomerOrder"
CustomerOrderEventPayload:
type: object
properties:
customerOrderId:
type: string
eventType:
type: string
enum:
- "created"
- "updated"
- "deleted"
customerOrder:
$ref: "#/components/schemas/CustomerOrder"
ShippingDetailsRequestPayload:
type: object
properties:
shippingDetailsId:
type: string
requestType:
type: string
enum:
- "create"
- "update"
- "delete"
shippingDetails:
$ref: "#/components/schemas/ShippingDetails"
ShippingDetailsEventPayload:
type: object
properties:
shippingDetailsId:
type: string
eventType:
type: string
enum:
- "created"
- "updated"
- "deleted"
shippingDetails:
$ref: "#/components/schemas/ShippingDetails"
PaymentDetailsRequestPayload:
type: object
properties:
paymentDetailsId:
type: string
requestType:
type: string
enum:
- "create"
- "update"
- "delete"
paymentDetails:
$ref: "#/components/schemas/PaymentDetails"
PaymentDetailsEventPayload:
type: object
properties:
paymentDetailsId:
type: string
eventType:
type: string
enum:
- "created"
- "updated"
- "deleted"
paymentDetails:
$ref: "#/components/schemas/PaymentDetails"