Skip to content

Commit

Permalink
feat: update es document request model (amundsen-io#1613)
Browse files Browse the repository at this point in the history
* feat: update es document request model

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>

* added operation field for option to add or overwrite field value

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Ozan Dogrultan <ozan.dogrultan@deliveryhero.com>
  • Loading branch information
allisonsuarez authored and ozandogrultan committed Apr 28, 2022
1 parent 79b6f34 commit 1850380
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions common/amundsen_common/models/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,18 @@ class SearchResponseSchema(AttrsSchema):
class Meta:
target = SearchResponse
register_as_scheme = True


@attr.s(auto_attribs=True, kw_only=True)
class UpdateDocumentRequest:
resource_key: str
resource_type: str
field: str
value: str
operation: str # can be add or overwrite


class UpdateDocumentRequestSchema(AttrsSchema):
class Meta:
target = UpdateDocumentRequest
register_as_scheme = True
2 changes: 1 addition & 1 deletion common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from setuptools import find_packages, setup

__version__ = '0.23.0'
__version__ = '0.24.0'


requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements-dev.txt')
Expand Down

0 comments on commit 1850380

Please sign in to comment.