bito-code-review[bot] commented on code in PR #38562:
URL: https://github.com/apache/superset/pull/38562#discussion_r2920148316


##########
superset/mcp_service/chart/schemas.py:
##########
@@ -403,26 +396,18 @@ def sanitize_label(cls, v: str | None) -> str | None:
 
 
 class AxisConfig(BaseModel):
-    title: str | None = Field(None, description="Axis title", max_length=200)
-    scale: Literal["linear", "log"] | None = Field(
-        "linear", description="Axis scale type"
-    )
-    format: str | None = Field(
-        None, description="Format string (e.g. '$,.2f')", max_length=50
-    )
+    title: str | None = Field(None, max_length=200)
+    scale: Literal["linear", "log"] | None = "linear"
+    format: str | None = Field(None, description="e.g. '$,.2f'", max_length=50)
 
 
 class LegendConfig(BaseModel):
-    show: bool = Field(True, description="Whether to show legend")
-    position: Literal["top", "bottom", "left", "right"] | None = Field(
-        "right", description="Legend position"
-    )
+    show: bool = True
+    position: Literal["top", "bottom", "left", "right"] | None = "right"
 
 
 class FilterConfig(BaseModel):
-    column: str = Field(
-        ..., description="Column to filter on", min_length=1, max_length=255
-    )
+    column: str = Field(..., min_length=1, max_length=255)

Review Comment:
   <!-- Bito Reply -->
   Yes, the suggestion is valid — it adds the same regex pattern validation to 
FilterConfig.column as used in ColumnRef.name, ensuring consistent input 
sanitization for column names across schemas.
   
   **superset/mcp_service/chart/schemas.py**
   ```
   column: str = Field(
       ...,
       min_length=1,
       max_length=255,
       pattern=r"^[a-zA-Z0-9_][a-zA-Z0-9_\s\-\.]*$",
   )
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to