aminghadersohi commented on code in PR #40957:
URL: https://github.com/apache/superset/pull/40957#discussion_r3417005498


##########
superset/mcp_service/dashboard/schemas.py:
##########
@@ -708,6 +708,146 @@ class GenerateDashboardResponse(BaseModel):
     )
 
 
+class UpdateDashboardRequest(BaseModel):
+    """Request schema for partially updating dashboard metadata.
+
+    All fields except ``dashboard_id`` are optional — only the fields that
+    are provided are changed. ``None`` means "leave unchanged"; to clear a
+    text field (e.g. ``certified_by``) pass an empty string.
+    """
+
+    model_config = ConfigDict(populate_by_name=True)
+
+    dashboard_id: int = Field(..., description="ID of the dashboard to update")
+
+    # Direct dashboard fields (match DashboardPutSchema)
+    dashboard_title: str | None = Field(
+        None,
+        description="New dashboard title.",
+        validation_alias=AliasChoices("dashboard_title", "title", "name"),
+    )
+    slug: str | None = Field(
+        None, description="New URL slug for the dashboard (must be unique)."
+    )
+    published: bool | None = Field(
+        None,
+        description=(
+            "Set to true to publish the dashboard (visible to other users), "
+            "false to unpublish it (draft)."
+        ),
+    )
+    css: str | None = Field(None, description="Custom CSS applied to the 
dashboard.")
+    theme_id: int | None = Field(None, description="Theme ID for the 
dashboard.")
+    certified_by: str | None = Field(
+        None,
+        description=(
+            "Person or group that certified this dashboard. "
+            "Pass an empty string to clear."
+        ),
+    )
+    certification_details: str | None = Field(
+        None,
+        description=("Details of the certification. Pass an empty string to 
clear."),
+    )
+    owners: list[int] | None = Field(

Review Comment:
   Done — dropped `owners` from `update_dashboard` in 
58c1f70fbd8bfb824a7686d39a300c3dd19e3040.
   
   `roles`/`tags` stay (lower-risk replacement fields). Removed it from the 
schema, `_DIRECT_FIELDS`, the tool/module docstrings, the 
`DEFAULT_INSTRUCTIONS` line, and the unit test (renamed to 
`test_update_roles_tags`). Tests green.
   
   Follow-up for a dedicated owner-management tool with explicit add/remove 
semantics + a "keep ≥1 owner" guard: sc-111121.



-- 
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