Renaming models/api/ folder to models/schemas/

This commit is contained in:
2025-09-21 21:02:05 +02:00
parent ed775b9822
commit 2db03b20c5
32 changed files with 63 additions and 181 deletions

92
main.py
View File

@@ -57,7 +57,7 @@ def health_check(db: Session = Depends(get_db)):
"swagger": "/docs",
"redoc": "/redoc",
"openapi": "/openapi.json",
"complete": "Documentation site URL here",
"complete": "/documentation",
},
"features": [
"JWT Authentication",
@@ -79,89 +79,13 @@ def health_check(db: Session = Depends(get_db)):
# Documentation redirect endpoints
@app.get("/documentation", response_class=HTMLResponse, include_in_schema=False)
async def documentation_page():
"""Enhanced documentation hub page"""
return """
<!DOCTYPE html>
<html>
<head>
<title>Letzshop Import - Documentation</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 800px;
margin: 40px auto;
padding: 20px;
line-height: 1.6;
}
.header { text-align: center; margin-bottom: 40px; }
.logo { font-size: 2em; margin-bottom: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 30px 0; }
.card {
border: 1px solid #e1e5e9;
border-radius: 8px;
padding: 20px;
transition: box-shadow 0.2s;
text-decoration: none;
color: inherit;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.card h3 { margin-top: 0; color: #1976d2; }
.badge {
display: inline-block;
background: #1976d2;
color: white;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.8em;
margin-left: 10px;
}
</style>
</head>
<body>
<div class="header">
<div class="logo">📚 Letzshop Import Documentation</div>
<p>Choose your documentation experience</p>
</div>
<div class="cards">
<a href="/docs" class="card">
<h3>🔧 Interactive API Docs <span class="badge">LIVE</span></h3>
<p>Swagger UI interface for testing API endpoints directly in your browser. Perfect for development and API exploration.</p>
</a>
<a href="/redoc" class="card">
<h3>📖 API Reference</h3>
<p>Clean, readable API documentation with ReDoc. Great for understanding API structure and parameters.</p>
</a>
<a href="#" class="card">
<h3>📚 Complete Documentation</h3>
<p>Comprehensive project documentation with guides, tutorials, architecture, and development info.</p>
</a>
<a href="#" class="card">
<h3>🚀 Getting Started</h3>
<p>Step-by-step installation and setup guide to get you up and running quickly.</p>
</a>
<a href="#" class="card">
<h3>🧪 Testing Guide</h3>
<p>Testing conventions, how to run tests, and contribute to the test suite.</p>
</a>
<a href="/health" class="card">
<h3>💚 System Health</h3>
<p>Check the current status and health of the API and its dependencies.</p>
</a>
</div>
<div style="text-align: center; margin-top: 40px; color: #666;">
<p>Need help? Check our <a href="https://github.com/yourusername/letzshop-import/issues">GitHub Issues</a></p>
</div>
</body>
</html>
"""
async def documentation():
"""Redirect to MkDocs documentation"""
# Development
if settings.debug:
return RedirectResponse(url="http://localhost:8001")
# Production
return RedirectResponse(url=settings.documentation_url)
if __name__ == "__main__":