forked from GreatDevelopers/jorani
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testapi.php
35 lines (32 loc) · 1.03 KB
/
testapi.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ServiceDesk Service Swagger</title>
<link rel="icon" type="image/x-icon" href="favicon.ico" sizes="32x32">
<link rel="stylesheet" type="text/css" href="assets/swagger-ui-3.20.9/swagger-ui.css">
<script src="assets/swagger-ui-3.20.9/swagger-ui-standalone-preset.js"></script>
<script src="assets/swagger-ui-3.20.9/swagger-ui-bundle.js"></script>
</head>
<body>
<a href="requirements.php">Back to Requirements</a>
<div id="swagger-ui"></div>
<script>
<?php
$baseUrl = dirname((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
$baseUrl = $baseUrl . "/api/doc";
?>
window.onload = function() {
const ui = SwaggerUIBundle({
url: "<?php echo $baseUrl; ?>",
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
layout: "StandaloneLayout"
});
}
</script>
</body>
</html>