aminghadersohi commented on code in PR #43828:
URL: https://github.com/apache/superset/pull/43828#discussion_r3944701441
##########
superset/core/mcp/core_mcp_injection.py:
##########
@@ -38,6 +41,83 @@
logger = logging.getLogger(__name__)
+def _strip_schema_titles(value: Any) -> Any:
+ """Remove generated JSON Schema titles while preserving useful metadata."""
+ if isinstance(value, list):
+ return [_strip_schema_titles(item) for item in value]
+ if not isinstance(value, dict):
+ return value
+ return {
+ key: _strip_schema_titles(item) for key, item in value.items() if key
!= "title"
+ }
Review Comment:
Applied the suggested distinction: only string-valued JSON Schema `title`
annotations are removed, while a `properties.title` subschema is retained.
Added a direct regression test plus inventory coverage for
`open_sql_lab_with_context` and representative top-level output contracts.
--
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]