pierrejeambrun commented on code in PR #51889:
URL: https://github.com/apache/airflow/pull/51889#discussion_r2161981190


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/plugins.py:
##########
@@ -65,20 +65,22 @@ class AppBuilderMenuItemResponse(BaseModel):
     model_config = ConfigDict(extra="allow")
 
     name: str
-    href: str | None = None
+    href: str
     category: str | None = None
 
 
-class IFrameViewsResponse(BaseModel):
+class ExternalViewResponse(BaseModel):
     """Serializer for IFrame Plugin responses."""
 
     model_config = ConfigDict(extra="allow")
 
     name: str
-    src: str
+    href: str

Review Comment:
   Not exactly, `href` is always required, for both `url_route` and not 
`url_route`
   - if url_route is 'None' -> that's an external link, but we need the link 
via the href
   - if url_route is specified -> that's an embedded iframe and we the resource 
to frame via href. (url_route is the path in our router to expose the Iframe, 
i.e what will be displayed in browser URL in airflow when viewing the iframe)



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to