234 lines
8.4 KiB
HTML
234 lines
8.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>API Docs - WSCONCILIA Laravel</title>
|
|
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui.css" />
|
|
<link rel="icon" type="image/png" href="https://unpkg.com/swagger-ui-dist@5.9.0/favicon-32x32.png" sizes="32x32" />
|
|
<style>
|
|
html {
|
|
box-sizing: border-box;
|
|
overflow: -moz-scrollbars-vertical;
|
|
overflow-y: scroll;
|
|
}
|
|
*, *:before, *:after {
|
|
box-sizing: inherit;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
background: #fafafa;
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
}
|
|
.header-banner {
|
|
background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
|
|
color: white;
|
|
padding: 25px 20px;
|
|
text-align: center;
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
}
|
|
.header-banner h1 {
|
|
margin: 0 0 10px 0;
|
|
font-size: 2.2em;
|
|
font-weight: 600;
|
|
}
|
|
.header-banner p {
|
|
margin: 0;
|
|
font-size: 1.1em;
|
|
opacity: 0.9;
|
|
}
|
|
.migration-badge {
|
|
display: inline-block;
|
|
background: #27ae60;
|
|
color: white;
|
|
padding: 5px 12px;
|
|
border-radius: 20px;
|
|
font-size: 0.85em;
|
|
margin-top: 10px;
|
|
font-weight: 500;
|
|
}
|
|
.info-cards {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 20px;
|
|
padding: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.info-card {
|
|
background: white;
|
|
border-radius: 8px;
|
|
padding: 15px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
min-width: 200px;
|
|
text-align: center;
|
|
}
|
|
.info-card h3 {
|
|
margin: 0 0 10px 0;
|
|
color: #2c3e50;
|
|
font-size: 1.1em;
|
|
}
|
|
.info-card p {
|
|
margin: 0;
|
|
color: #7f8c8d;
|
|
font-size: 0.9em;
|
|
}
|
|
.swagger-container {
|
|
max-width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.swagger-ui .topbar {
|
|
display: none;
|
|
}
|
|
.swagger-ui .info {
|
|
margin: 20px 0;
|
|
}
|
|
.swagger-ui .info hgroup.main {
|
|
background: none;
|
|
padding: 0;
|
|
}
|
|
.swagger-ui .scheme-container {
|
|
background: #f8f9fa;
|
|
padding: 15px;
|
|
border-radius: 6px;
|
|
margin: 20px 0;
|
|
}
|
|
.footer-info {
|
|
background: #ecf0f1;
|
|
padding: 20px;
|
|
text-align: center;
|
|
margin-top: 40px;
|
|
border-top: 1px solid #bdc3c7;
|
|
}
|
|
.footer-info p {
|
|
margin: 5px 0;
|
|
color: #7f8c8d;
|
|
}
|
|
.endpoints-count {
|
|
color: #e74c3c;
|
|
font-weight: bold;
|
|
}
|
|
.database-info {
|
|
color: #3498db;
|
|
font-weight: bold;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- Header Banner -->
|
|
<div class="header-banner">
|
|
<h1>🚀 WSCONCILIA API Documentation</h1>
|
|
<p>Documentación completa de la API REST migrada desde PHP a Laravel Framework</p>
|
|
<span class="migration-badge">✅ Migrado desde ObtenCiudades.php y ObtenEmpresas.php</span>
|
|
</div>
|
|
|
|
<!-- Info Cards -->
|
|
<div class="info-cards">
|
|
<div class="info-card">
|
|
<h3>📊 Base de Datos</h3>
|
|
<p class="database-info">SQL Server 10.201.84.3</p>
|
|
<p>Database: personal</p>
|
|
</div>
|
|
<div class="info-card">
|
|
<h3>🔗 Endpoints</h3>
|
|
<p><span class="endpoints-count">7</span> endpoints disponibles</p>
|
|
<p>API v1.0.0</p>
|
|
</div>
|
|
<div class="info-card">
|
|
<h3>⚡ Estado</h3>
|
|
<p><span style="color: #27ae60; font-weight: bold;">✅ Listo para testing</span></p>
|
|
<p>Requiere conexión BD</p>
|
|
</div>
|
|
<div class="info-card">
|
|
<h3>🛠 Framework</h3>
|
|
<p><span style="color: #e74c3c; font-weight: bold;">Laravel 12.x</span></p>
|
|
<p>PHP 8.1+</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Swagger UI Container -->
|
|
<div class="swagger-container">
|
|
<div id="swagger-ui"></div>
|
|
</div>
|
|
|
|
<!-- Footer Information -->
|
|
<div class="footer-info">
|
|
<p><strong>📅 Fecha de migración:</strong> 12 de septiembre de 2025</p>
|
|
<p><strong>🔧 Archivos migrados:</strong> config.php → .env | ObtenCiudades.php → CiudadesController | ObtenEmpresas.php → EmpresasController</p>
|
|
<p><strong>📋 Procedimientos almacenados:</strong> sapObtenListadoCiudadesxNombre, sapObtenEmpresas</p>
|
|
<p><strong>🌐 URLs de testing:</strong>
|
|
<a href="/api/health" target="_blank" style="color: #3498db;">/api/health</a> |
|
|
<a href="/api/info" target="_blank" style="color: #3498db;">/api/info</a> |
|
|
<a href="/openapi.yaml" target="_blank" style="color: #3498db;">openapi.yaml</a>
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Swagger UI Scripts -->
|
|
<script src="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui-bundle.js"></script>
|
|
<script src="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui-standalone-preset.js"></script>
|
|
<script>
|
|
window.onload = function() {
|
|
// Configuración del Swagger UI
|
|
const ui = SwaggerUIBundle({
|
|
url: './openapi.yaml', // Ruta relativa al archivo OpenAPI
|
|
dom_id: '#swagger-ui',
|
|
deepLinking: true,
|
|
presets: [
|
|
SwaggerUIBundle.presets.apis,
|
|
SwaggerUIStandalonePreset
|
|
],
|
|
plugins: [
|
|
SwaggerUIBundle.plugins.DownloadUrl
|
|
],
|
|
layout: "StandaloneLayout",
|
|
|
|
// Configuración de visualización
|
|
tryItOutEnabled: true, // Permite probar endpoints
|
|
filter: true, // Filtro de búsqueda
|
|
showRequestHeaders: true, // Muestra headers de request
|
|
showResponseHeaders: true, // Muestra headers de response
|
|
docExpansion: "list", // Expansión inicial (none, list, full)
|
|
defaultModelExpandDepth: 2, // Profundidad de expansión de modelos
|
|
defaultModelsExpandDepth: 2, // Profundidad de expansión de schemas
|
|
displayOperationId: true, // Muestra operation IDs
|
|
displayRequestDuration: true, // Muestra duración de requests
|
|
|
|
// Configuración de servidor por defecto
|
|
servers: [
|
|
{
|
|
url: 'http://localhost:8000/api',
|
|
description: 'Servidor de desarrollo Laravel'
|
|
}
|
|
],
|
|
|
|
// Callbacks personalizados
|
|
onComplete: function() {
|
|
console.log('✅ Swagger UI cargado correctamente');
|
|
console.log('📋 Documentando API WSCONCILIA migrada desde PHP a Laravel');
|
|
},
|
|
|
|
requestInterceptor: function(request) {
|
|
// Agregar headers personalizados si es necesario
|
|
request.headers['Accept'] = 'application/json';
|
|
console.log('📤 Request:', request.method, request.url);
|
|
return request;
|
|
},
|
|
|
|
responseInterceptor: function(response) {
|
|
console.log('📥 Response:', response.status, response.url);
|
|
return response;
|
|
}
|
|
});
|
|
|
|
// Agregar información adicional al cargar
|
|
setTimeout(() => {
|
|
console.log('🎯 WSCONCILIA API Laravel - Documentación OpenAPI');
|
|
console.log('📊 Endpoints documentados: Ciudades, Empresas, Health, Info');
|
|
console.log('🔧 Migrado desde: ObtenCiudades.php, ObtenEmpresas.php');
|
|
console.log('💾 Base de datos: SQL Server 10.201.84.3/personal');
|
|
}, 1000);
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>
|