Skip to content

Instantly share code, notes, and snippets.

@cupuyc
Created November 20, 2021 14:38
Show Gist options
  • Save cupuyc/f883b2477c49865fabdb63d931b98ea6 to your computer and use it in GitHub Desktop.
Save cupuyc/f883b2477c49865fabdb63d931b98ea6 to your computer and use it in GitHub Desktop.
asyncapi: '2.2.0'
info:
title: Kafka API with Core-Processing
version: 1.0.0
description: This service is part of core bank and responsible for accepting card operations commands
channels:
paymentTransactions/InitTransaction:
publish:
message:
$ref: '#/components/messages/InitTransaction'
subscribe:
message:
$ref: '#/components/messages/InitTransactionResponse'
paymentTransactions/CommitTransaction:
publish:
message:
$ref: '#/components/messages/CommitTransaction'
subscribe:
message:
$ref: '#/components/messages/CommitTransactionResponse'
paymentTransactions/Error:
subscribe:
message:
$ref: '#/components/messages/OperationError'
components:
messages:
InitTransaction:
payload:
type: object
properties:
operationId:
type: string
description: Utility field
requestorAccount:
type: string
description: Account number
receiverAccount:
type: string
description: Account number
amount:
type: number
format: money
description: Amount to block
blockDuration:
type: number
description: Block duration in seconds
InitTransactionResponse:
payload:
type: object
properties:
operationId:
type: string
description: Utility field
transactionId:
type: string
description: Account number
CommitTransaction:
payload:
type: object
properties:
operationId:
type: string
description: Utility field
transactionId:
type: string
description: Transaction Id
CommitTransactionResponse:
payload:
type: object
properties:
operationId:
type: string
description: Utility field
transactionId:
type: string
description: Transaction Id
OperationError:
payload:
type: object
properties:
operationId:
type: string
description: Utility field
errorCode:
type: string
errorMessage:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment