Skip to content

Commit

Permalink
HOTFIX: Ensure we use the alias when exporting (#29010)
Browse files Browse the repository at this point in the history
* Ensure we use the alias when exporting

* bump lock file
  • Loading branch information
bnchrch authored Aug 2, 2023
1 parent 2a62e5e commit f823c0f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
2 changes: 1 addition & 1 deletion airbyte-ci/connectors/metadata_service/lib/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metadata-service"
version = "0.1.1"
version = "0.1.2"
description = ""
authors = ["Ben Church <[email protected]>"]
readme = "README.md"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f823c0f

Please sign in to comment.