diff --git a/io/specmatic/examples/store/asyncapi/3_0_0/order_service_async_v1.yaml b/io/specmatic/examples/store/asyncapi/3_0_0/order_service_async_v1.yaml index 49257f9..7e6135c 100644 --- a/io/specmatic/examples/store/asyncapi/3_0_0/order_service_async_v1.yaml +++ b/io/specmatic/examples/store/asyncapi/3_0_0/order_service_async_v1.yaml @@ -33,10 +33,20 @@ components: name: OrderRequest title: An order request contentType: application/json + headers: + type: object + properties: + requestId: + type: string + description: Provide request id that you will use to identify the reply match + correlationId: + $ref: "#/components/correlationIds/orderCorrelationId" payload: $ref: '#/components/schemas/OrderRequest' examples: - name: NEW_ORDER + headers: + requestId: 1234 payload: id: 12345 orderItems: @@ -52,6 +62,14 @@ components: name: OrderToProcess title: An order that needs to be processed contentType: application/json + headers: + type: object + properties: + requestId: + type: string + description: Reply message must contain correlation id of the request message + correlationId: + $ref: "#/components/correlationIds/orderCorrelationId" payload: type: object required: @@ -71,32 +89,11 @@ components: - FAILED examples: - name: NEW_ORDER + headers: + requestId: 1234 payload: totalAmount: 3000.00 status: "PROCESSED" - Notification: - name: Notification - title: A notification message - contentType: application/json - payload: - type: object - required: - - message - - type - properties: - message: - type: string - type: - type: string - enum: - - ORDER_PLACED - - ORDER_PROCESSED - - examples: - - name: NEW_ORDER - payload: - message: "Order processed successfully" - type: "ORDER_PLACED" schemas: OrderRequest: type: object @@ -128,3 +125,6 @@ components: price: type: number + correlationIds: + orderCorrelationId: + location: '$message.header#/requestId'