mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-23 10:06:37 +00:00
feat: stage3 — REST API endpoints and dummy FlightProcessor
This commit is contained in:
+11
-7
@@ -3,21 +3,25 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
from gps_denied import __version__
|
||||
from gps_denied.api.routers import flights
|
||||
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
"""Create and configure the FastAPI application."""
|
||||
application = FastAPI(
|
||||
title="GPS-Denied Onboard",
|
||||
"""Factory function to create and configure the FastAPI application."""
|
||||
app = FastAPI(
|
||||
title="GPS-Denied Onboard API",
|
||||
description="REST API for UAV Flight Processing in GPS-denied environments.",
|
||||
version=__version__,
|
||||
description="UAV geolocalization service for GPS-denied environments",
|
||||
)
|
||||
|
||||
@application.get("/health")
|
||||
async def health() -> dict:
|
||||
app.include_router(flights.router)
|
||||
|
||||
@app.get("/health", tags=["Health"])
|
||||
async def health() -> dict[str, str]:
|
||||
"""Simple health check endpoint."""
|
||||
return {"status": "ok"}
|
||||
|
||||
return application
|
||||
return app
|
||||
|
||||
|
||||
app = create_app()
|
||||
|
||||
Reference in New Issue
Block a user