Add SSO settings response model in proxy_setting_endpoints.py

- Introduced SSOSettingsResponse model to encapsulate SSO configuration values and schema information.
- Updated the get_sso_settings endpoint to utilize the new response model, enhancing API clarity and usability.
This commit is contained in:
Cole McIntosh 2025-06-04 14:55:29 -06:00
parent c41b14e27b
commit 3cc9460922

View file

@ -1,5 +1,5 @@
#### CRUD ENDPOINTS for UI Settings #####
from typing import Any, List, Union
from typing import Any, Dict, List, Union
from fastapi import APIRouter, Depends, HTTPException
@ -16,6 +16,16 @@ class IPAddress(BaseModel):
ip: str
class SSOSettingsResponse(BaseModel):
"""Response model for SSO settings with values and schema information"""
values: Dict[str, Any]
"""The current SSO configuration values"""
schema: Dict[str, Any]
"""Schema information including descriptions and property types for UI display"""
@router.get(
"/get/allowed_ips",
tags=["Budget & Spend Tracking"],
@ -287,6 +297,7 @@ async def update_default_team_settings(settings: DefaultTeamSSOParams):
"/get/sso_settings",
tags=["SSO Settings"],
dependencies=[Depends(user_api_key_auth)],
response_model=SSOSettingsResponse,
)
async def get_sso_settings():
"""