migrant-web/resources/views/swagger.blade.php
2026-05-21 10:39:23 +05:30

64 lines
2.2 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Migrant Mobile API Documentation</title>
<!-- Swagger UI Assets from official CDN -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.11.0/swagger-ui.css" />
<link rel="icon" type="image/png" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.11.0/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.11.0/favicon-16x16.png" sizes="16x16" />
<style>
html {
box-sizing: border-box;
overflow-y: scroll;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
margin: 0;
background: #fafafa;
}
/* Custom themed brand matching the Migrant portal color scheme */
.swagger-ui .topbar {
background-color: #185FA5;
padding: 12px 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.swagger-ui .topbar .download-url-wrapper .select-label {
color: #ffffff;
font-weight: bold;
}
.swagger-ui .topbar a {
max-width: 150px;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.11.0/swagger-ui-bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.11.0/swagger-ui-standalone-preset.js"></script>
<script>
window.onload = function() {
// Load and render Swagger UI with local public/swagger.json specification
const ui = SwaggerUIBundle({
url: "/swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
});
window.ui = ui;
};
</script>
</body>
</html>