mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
feat(organization): expose PATCH /v2/organization/{organization_id} in the OpenAPI spec
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
a53c550951
commit
361170f9d4
2 changed files with 14 additions and 1 deletions
|
|
@ -764,7 +764,6 @@ async def handle_update_object_permission(
|
|||
tags=["organization management"],
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
response_model=LiteLLM_OrganizationTableWithMembers,
|
||||
include_in_schema=False,
|
||||
)
|
||||
async def update_organization_v2(
|
||||
organization_id: str,
|
||||
|
|
|
|||
|
|
@ -1063,3 +1063,17 @@ async def test_find_member_if_email_missing_row_raises_documented_400():
|
|||
"non-existent user_email in LiteLLM_UserTable. Use 'user_id' instead."
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
def test_v2_update_organization_is_in_openapi_schema():
|
||||
"""PATCH /v2/organization/{organization_id} is documented in the generated OpenAPI spec."""
|
||||
from fastapi import FastAPI
|
||||
|
||||
from litellm.proxy.management_endpoints.organization_endpoints import router
|
||||
|
||||
app = FastAPI()
|
||||
app.include_router(router)
|
||||
|
||||
v2_path = app.openapi()["paths"]["/v2/organization/{organization_id}"]
|
||||
assert v2_path["patch"]["tags"] == ["organization management"]
|
||||
assert "OrganizationUpdateRequestV2" in json.dumps(v2_path["patch"]["requestBody"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue