From 0eb2363074bef6fd413c598fa0de20b7d11f10b2 Mon Sep 17 00:00:00 2001 From: ryan-crabbe-berri Date: Fri, 4 Sep 2026 13:10:37 -0700 Subject: [PATCH] test(organization): assert route publicity through the production OpenAPI generator --- .../management_endpoints/test_organization_endpoints.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/test_litellm/proxy/management_endpoints/test_organization_endpoints.py b/tests/test_litellm/proxy/management_endpoints/test_organization_endpoints.py index 9218cec4308..6ce9e54cae0 100644 --- a/tests/test_litellm/proxy/management_endpoints/test_organization_endpoints.py +++ b/tests/test_litellm/proxy/management_endpoints/test_organization_endpoints.py @@ -729,13 +729,9 @@ async def _run_update_organization_v2( def test_v2_update_route_is_public_in_openapi(): """PATCH /v2/organization/{organization_id} is a public route: hiding it again (include_in_schema=False) would drop it from openapi.json, /docs, and the generated UI API types.""" - from fastapi import FastAPI + from litellm.proxy.proxy_server import get_openapi_schema - from litellm.proxy.management_endpoints.organization_endpoints import router - - app = FastAPI() - app.include_router(router) - v2_path = app.openapi()["paths"].get("/v2/organization/{organization_id}") + v2_path = get_openapi_schema()["paths"].get("/v2/organization/{organization_id}") assert v2_path is not None assert "patch" in v2_path