diff --git a/airbyte-ci/connectors/metadata_service/lib/metadata_service/utils.py b/airbyte-ci/connectors/metadata_service/lib/metadata_service/utils.py deleted file mode 100644 index 07d50db9a987..000000000000 --- a/airbyte-ci/connectors/metadata_service/lib/metadata_service/utils.py +++ /dev/null @@ -1,22 +0,0 @@ -import json -from pydantic import BaseModel - - -def to_json_sanitized_dict(pydantic_model_obj: BaseModel, **kwargs) -> dict: - """A helper function to convert a pydantic model to a sanitized dict. - - Without this pydantic dictionary may contain values that are not JSON serializable. - - Args: - pydantic_model_obj (BaseModel): a pydantic model - - Returns: - dict: a sanitized dictionary - """ - defalut_kwargs = { - "by_alias": True, # Ensure that the original field name from the jsonschema is used in the event it begins with an underscore (e.g. ab_internal) - } - - kwargs = {**defalut_kwargs, **kwargs} - - return json.loads(pydantic_model_obj.json(**kwargs))