Lee-W commented on code in PR #47659:
URL: https://github.com/apache/airflow/pull/47659#discussion_r1990898216
##########
airflow/api_fastapi/execution_api/datamodels/asset.py:
##########
@@ -38,14 +38,18 @@ class AssetAliasResponse(BaseModel):
class AssetProfile(StrictBaseModel):
"""
- Profile of an Asset.
+ Profile of an asset-like object.
- Asset will have name, uri and asset_type defined.
- AssetNameRef will have name and asset_type defined.
- AssetUriRef will have uri and asset_type defined.
+ Asset will have name, uri defined, with type set to 'Asset'.
+ AssetNameRef will have name defined, type set to 'AssetNameRef'.
+ AssetUriRef will have uri defined, type set to 'AssetUriRef'.
+ AssetAlias will have name defined, type set to 'AssetAlias'.
+ Note that 'type' here is distinct from 'asset_type' the user declares on an
+ Asset (or subclass). This field is for distinguishing between different
+ asset-related types (Asset, AssetRef, or AssetAlias).
"""
name: str | None = None
uri: str | None = None
- asset_type: str
+ type: str
Review Comment:
I am not sure whether using the keyword `type` is a good idea. I thought of
`obj_type` in my previous PR but `profile_type` might be a good one as well.
Non blocker though
--
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]