From 1df83ea2dd63ddb6160c23988121a06164f78775 Mon Sep 17 00:00:00 2001 From: Anderson Lemes Date: Thu, 5 Jun 2025 20:22:54 -0300 Subject: [PATCH] fix(schemas): align MCPServer schema validation with database constraints - Update config_type validation to accept ['studio', 'sse'] instead of ['studio', 'custom'] - Update type validation to accept ['official', 'community'] instead of ['official', 'custom'] - Resolves ResponseValidationError when listing MCP servers --- src/schemas/schemas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schemas/schemas.py b/src/schemas/schemas.py index ec5d521d..3649bdd7 100644 --- a/src/schemas/schemas.py +++ b/src/schemas/schemas.py @@ -427,7 +427,7 @@ class MCPServerBase(BaseModel): @field_validator("config_type") @classmethod def validate_config_type(cls, v): - valid_types = ["studio", "custom"] + valid_types = ["studio", "sse"] if v not in valid_types: raise ValueError(f"config_type must be one of: {valid_types}") return v @@ -435,7 +435,7 @@ class MCPServerBase(BaseModel): @field_validator("type") @classmethod def validate_type(cls, v): - valid_types = ["official", "custom"] + valid_types = ["official", "community"] if v not in valid_types: raise ValueError(f"type must be one of: {valid_types}") return v