
- Set up project structure with FastAPI framework - Create database models for users, employees, departments, and job titles - Implement JWT authentication and authorization system - Set up SQLite database with SQLAlchemy ORM - Add Alembic migrations for database versioning - Create CRUD API endpoints for employee management - Implement category-based search functionality - Add OpenAPI documentation and health check endpoint - Update README with comprehensive setup and usage instructions
11 lines
235 B
Python
11 lines
235 B
Python
import json
|
|
from main import app
|
|
|
|
# Generate the OpenAPI schema
|
|
schema = app.openapi()
|
|
|
|
# Write to file
|
|
with open("openapi.json", "w") as f:
|
|
json.dump(schema, f, indent=2)
|
|
|
|
print("OpenAPI schema has been generated at openapi.json") |