working example

pull/1/head
Vyacheslav N. Boyko 2022-04-08 11:49:26 +03:00
parent 5cb84ecd99
commit 12e25cc1c0
3 changed files with 3164 additions and 17 deletions

File diff suppressed because one or more lines are too long

View File

@ -4,20 +4,74 @@ info:
version: 1.0.0 version: 1.0.0
description: This service is in charge of processing user signups description: This service is in charge of processing user signups
channels: channels:
card/authorization: notifications/card/authorization:
subscribe: publish:
message: message:
$ref: '#/components/messages/UserSignedUp' $ref: '#/components/messages/CardOperationNotificationDto'
components: components:
messages: messages:
UserSignedUp: CardOperationNotificationDto:
payload: payload:
type: object type: object
properties: properties:
displayName: cardId:
type: string type: string
description: Name of the user description: Card ID
email: walletId:
type: string type: string
format: email description: Wallet ID
description: Email of the user notification:
type: object
description: Notification about card operation authorization
properties:
uuid:
type: string
status:
type: string
type:
type: object
properties:
code:
type: string
direction:
type: string
description:
type: string
mcc:
type: number
authDate:
type: string
format: date
authTyme:
type: string
firmat: time
postingDate:
type: string
authCode:
type: string
rrn:
type: number
merchantId:
type: number
terminalId:
type: number
merchantName:
type: string
merchantCity:
type: string
merchantSum:
type: object
properties:
amount:
type: number
currency:
type: string
cardSum:
type: object
properties:
amount:
type: number
currency:
type: string
authDescription:
type: string

View File

@ -22,8 +22,8 @@
<div class="tabs is-large"> <div class="tabs is-large">
<ul> <ul>
<li id="page-api" class="is-active"><a>API</a></li> <li id="page-api" class="is-active" onclick="showApi();"><a>API</a></li>
<li id="page-async-api"><a>Async API</a></li> <li id="page-async-api" onclick="showAsyncApi();"><a>Async API</a></li>
</ul> </ul>
</div> </div>
@ -32,7 +32,7 @@
</div> </div>
<div id="async-api"> <div id="async-api">
<iframe src="async-api/site/index.html" width="100%" height="1000" seamless="yes"></iframe>
</div> </div>
@ -40,16 +40,29 @@
<script> <script>
if (document.readyState == 'loading') { if (document.readyState == 'loading') {
document.addEventListener("DOMContentLoaded", () => initRedoc()); document.addEventListener("DOMContentLoaded", () => initRedoc());
} else { } else {
initRedoc(); initRedoc();
} }
var isLocalhost = location.hostname === "localhost" || location.hostname === "127.0.0.1"; var isLocalhost = location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.protocol === 'file:';
var api_url = isLocalhost ? '/api/waas-api.json' : 'https://profee-waas.github.io/pf-waas-api/api/waas-api.json'; var api_url = isLocalhost ? '/api/waas-api.json' : 'https://profee-waas.github.io/pf-waas-api/api/waas-api.json';
function initRedoc() { function initRedoc() {
Redoc.init(api_url, {"pathInMiddlePanel":true}); Redoc.init(api_url, {"pathInMiddlePanel":true});
showApi();
}
function showApi() {
document.getElementById("page-api").classList.add("is-active");
document.getElementById("page-async-api").classList.remove("is-active");
document.getElementById("async-api").style.display = "none";
document.getElementById("api").style.display = "block";
}
function showAsyncApi() {
document.getElementById("page-async-api").classList.add("is-active");
document.getElementById("page-api").classList.remove("is-active");
document.getElementById("api").style.display = "none";
document.getElementById("async-api").style.display = "block";
} }
</script> </script>