codeant-ai-for-open-source[bot] commented on code in PR #45522:
URL: https://github.com/apache/superset/pull/45522#discussion_r4339046284
##########
superset-core/src/superset_core/extensions/types.py:
##########
@@ -29,12 +29,85 @@
from superset_core.extensions.constants import (
DISPLAY_NAME_PATTERN,
+ PAGE_PATH_PATTERN,
+ PERMISSION_NAME_PATTERN,
PUBLISHER_PATTERN,
TECHNICAL_NAME_PATTERN,
VERSION_PATTERN,
)
+class PageNav(BaseModel):
+ """Placement of a page in the navigation."""
+
+ label: str = Field(
+ ...,
+ description="Text of the navigation entry",
+ min_length=1,
+ )
Review Comment:
Yes—this is a real schema/API mismatch. `PageNav` should allow `label` to be
omitted; the frontend already falls back to the page’s `name`, so the schema
does not need to populate the default itself.
Make `label` optional with a `None` default while retaining `min_length=1`
when supplied. That allows manifests such as `"nav": {}` and `"nav":
{"category": "Manage"}` without changing menu behavior.
--
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]