amoghrajesh commented on code in PR #60410:
URL: https://github.com/apache/airflow/pull/60410#discussion_r2741457063


##########
airflow-core/src/airflow/providers_manager.py:
##########
@@ -926,6 +927,136 @@ def _get_attr(obj: Any, attr_name: str):
             return None
         return getattr(obj, attr_name)
 
+    def _get_connection_type_config_from_yaml(
+        self, provider_info: ProviderInfo, connection_type: str
+    ) -> dict | None:
+        """Get connection type config from provider.yaml if it exists."""
+        connection_types = provider_info.data.get("connection-types", [])
+        for conn_config in connection_types:
+            if conn_config.get("connection-type") == connection_type:
+                return conn_config
+        return None
+
+    @staticmethod
+    def _get_mock_field_for_field_type(field_type, field_format):
+        from airflow.api_fastapi.core_api.services.ui.connections import 
HookMetaService
+
+        field_type_to_mock_field_map = {
+            ("string", "password"): HookMetaService.MockPasswordField,
+            ("string", None): HookMetaService.MockStringField,
+            ("integer", None): HookMetaService.MockIntegerField,
+            ("boolean", None): HookMetaService.MockBooleanField,
+            ("number", None): HookMetaService.MockIntegerField,
+        }
+
+        field_class = field_type_to_mock_field_map.get((field_type, 
field_format))
+
+        return field_class
+
+    def _create_field_from_yaml(self, field_name: str, field_def: dict) -> Any:

Review Comment:
   Old code, removed it now.



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

Reply via email to