from fastapi import FastAPI from fastapi.responses import JSONResponse from app.config import settings from app.database import engine, Base from app.routers import categories, products, stock Base.metadata.create_all(bind=engine) app = FastAPI( title="API Inventario", description="Microservicio para gestionar inventario", version="1.0.0", ) app.include_router(categories.router, prefix=f"/api/{settings.API_VERSION}", tags=["Categories"]) app.include_router(products.router, prefix=f"/api/{settings.API_VERSION}", tags=["Products"]) app.include_router(stock.router, prefix=f"/api/{settings.API_VERSION}", tags=["Stock"]) @app.get("/health") def health(): return JSONResponse({"status": "ok"})