vincbeck commented on code in PR #36052:
URL: https://github.com/apache/airflow/pull/36052#discussion_r1414449599


##########
airflow/auth/managers/fab/fab_auth_manager.py:
##########
@@ -147,20 +149,22 @@ def get_cli_commands() -> list[CLICommand]:
             SYNC_PERM_COMMAND,  # not in a command group
         ]
 
-    def get_api_endpoints(self) -> None | FlaskApi:
+    def get_api_endpoints(self) -> None | FlaskApp:
         folder = Path(__file__).parents[0].resolve()  # this is 
airflow/auth/managers/fab/
-        with folder.joinpath("openapi", "v1.yaml").open() as f:
-            specification = safe_load(f)
-        return FlaskApi(
-            specification=specification,
-            resolver=_LazyResolver(),
-            base_path="/auth/fab/v1",
-            options={
-                "swagger_ui": conf.getboolean("webserver", 
"enable_swagger_ui", fallback=True),
-            },
+        # with folder.joinpath("openapi", "v1.yaml").open() as f:
+        #     specification = safe_load(f)
+        specification=folder.joinpath("openapi", "v1.yaml")
+        return FlaskApp(
+            import_name=__name__,
+            specification_dir=specification,
+            resolver=Resolver(),
+            # base_path="/auth/fab/v1",

Review Comment:
   Why is it commented out? We need it I guess?



##########
airflow/auth/managers/fab/fab_auth_manager.py:
##########
@@ -147,20 +149,22 @@ def get_cli_commands() -> list[CLICommand]:
             SYNC_PERM_COMMAND,  # not in a command group
         ]
 
-    def get_api_endpoints(self) -> None | FlaskApi:
+    def get_api_endpoints(self) -> None | FlaskApp:
         folder = Path(__file__).parents[0].resolve()  # this is 
airflow/auth/managers/fab/
-        with folder.joinpath("openapi", "v1.yaml").open() as f:
-            specification = safe_load(f)
-        return FlaskApi(
-            specification=specification,
-            resolver=_LazyResolver(),
-            base_path="/auth/fab/v1",
-            options={
-                "swagger_ui": conf.getboolean("webserver", 
"enable_swagger_ui", fallback=True),
-            },
+        # with folder.joinpath("openapi", "v1.yaml").open() as f:
+        #     specification = safe_load(f)

Review Comment:
   Remove these comments?



##########
airflow/www/extensions/init_views.py:
##########


Review Comment:
   You will have to modify the function `init_api_auth_provider` as well



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