From 62fab081494a816c06b02e0f4ddb020bf7e86539 Mon Sep 17 00:00:00 2001 From: Ben Church Date: Wed, 2 Aug 2023 12:27:37 -0700 Subject: [PATCH 1/2] Ensure we use the alias when exporting --- .../metadata_service/lib/metadata_service/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/airbyte-ci/connectors/metadata_service/lib/metadata_service/utils.py b/airbyte-ci/connectors/metadata_service/lib/metadata_service/utils.py index af30d53ab4ae..e7616f0f73ee 100644 --- a/airbyte-ci/connectors/metadata_service/lib/metadata_service/utils.py +++ b/airbyte-ci/connectors/metadata_service/lib/metadata_service/utils.py @@ -13,4 +13,10 @@ def to_json_sanitized_dict(pydantic_model_obj: BaseModel, **kwargs) -> dict: 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)) From e35b1787848156209ac1dc61776cc0a716db0ffb Mon Sep 17 00:00:00 2001 From: Ben Church Date: Wed, 2 Aug 2023 12:33:46 -0700 Subject: [PATCH 2/2] bump lock file --- airbyte-ci/connectors/metadata_service/lib/pyproject.toml | 2 +- .../connectors/metadata_service/orchestrator/poetry.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/airbyte-ci/connectors/metadata_service/lib/pyproject.toml b/airbyte-ci/connectors/metadata_service/lib/pyproject.toml index cacdc3dd5149..00950a054dab 100644 --- a/airbyte-ci/connectors/metadata_service/lib/pyproject.toml +++ b/airbyte-ci/connectors/metadata_service/lib/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "metadata-service" -version = "0.1.1" +version = "0.1.2" description = "" authors = ["Ben Church "] readme = "README.md" diff --git a/airbyte-ci/connectors/metadata_service/orchestrator/poetry.lock b/airbyte-ci/connectors/metadata_service/orchestrator/poetry.lock index 06e8894c8a37..7845d72be7c3 100644 --- a/airbyte-ci/connectors/metadata_service/orchestrator/poetry.lock +++ b/airbyte-ci/connectors/metadata_service/orchestrator/poetry.lock @@ -1791,13 +1791,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jsonschema" -version = "4.18.4" +version = "4.18.6" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" files = [ - {file = "jsonschema-4.18.4-py3-none-any.whl", hash = "sha256:971be834317c22daaa9132340a51c01b50910724082c2c1a2ac87eeec153a3fe"}, - {file = "jsonschema-4.18.4.tar.gz", hash = "sha256:fb3642735399fa958c0d2aad7057901554596c63349f4f6b283c493cf692a25d"}, + {file = "jsonschema-4.18.6-py3-none-any.whl", hash = "sha256:dc274409c36175aad949c68e5ead0853aaffbe8e88c830ae66bb3c7a1728ad2d"}, + {file = "jsonschema-4.18.6.tar.gz", hash = "sha256:ce71d2f8c7983ef75a756e568317bf54bc531dc3ad7e66a128eae0d51623d8a3"}, ] [package.dependencies] @@ -1984,7 +1984,7 @@ files = [ [[package]] name = "metadata-service" -version = "0.1.1" +version = "0.1.2" description = "" optional = false python-versions = "^3.9"