working example
parent
5cb84ecd99
commit
12e25cc1c0
3082
api/waas-api.json
3082
api/waas-api.json
File diff suppressed because one or more lines are too long
|
@ -4,20 +4,74 @@ info:
|
|||
version: 1.0.0
|
||||
description: This service is in charge of processing user signups
|
||||
channels:
|
||||
card/authorization:
|
||||
subscribe:
|
||||
notifications/card/authorization:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/UserSignedUp'
|
||||
$ref: '#/components/messages/CardOperationNotificationDto'
|
||||
components:
|
||||
messages:
|
||||
UserSignedUp:
|
||||
CardOperationNotificationDto:
|
||||
payload:
|
||||
type: object
|
||||
properties:
|
||||
displayName:
|
||||
cardId:
|
||||
type: string
|
||||
description: Name of the user
|
||||
email:
|
||||
description: Card ID
|
||||
walletId:
|
||||
type: string
|
||||
format: email
|
||||
description: Email of the user
|
||||
description: Wallet ID
|
||||
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
|
||||
|
|
27
index.html
27
index.html
|
@ -22,8 +22,8 @@
|
|||
|
||||
<div class="tabs is-large">
|
||||
<ul>
|
||||
<li id="page-api" class="is-active"><a>API</a></li>
|
||||
<li id="page-async-api"><a>Async API</a></li>
|
||||
<li id="page-api" class="is-active" onclick="showApi();"><a>API</a></li>
|
||||
<li id="page-async-api" onclick="showAsyncApi();"><a>Async API</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
|
||||
<div id="async-api">
|
||||
|
||||
<iframe src="async-api/site/index.html" width="100%" height="1000" seamless="yes"></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -40,16 +40,29 @@
|
|||
|
||||
<script>
|
||||
if (document.readyState == 'loading') {
|
||||
document.addEventListener("DOMContentLoaded", () => initRedoc());
|
||||
document.addEventListener("DOMContentLoaded", () => initRedoc());
|
||||
} 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';
|
||||
|
||||
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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue