INNER CODE UNIT · Python

custom_generate_unique_id

asacristani/fastapi-rocket-boilerplate · app/main.py:20

def custom_generate_unique_id(route: APIRoute):
    """Modifier of tags for openapi for improving the sdk client experience"""
    return f"{route.tags[0]}-{route.name}"


# Sentry Integration
sentry_sdk.init(
    dsn=settings.sentry_dsn,
    traces_sample_rate=settings.trace_rate,
)

app = FastAPI(generate_unique_id_function=custom_generate_unique_id)

# ROUTERS
routers = [user_router]
for router in routers:
    app.include_router(router)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…