You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Response class has a data field that implementations must provided. Prior to adopting Pydantic, data was just a dict. But the move to Pydantic required us to create full Pydantic BaseModel subtypes for data attributes. E.g., we end up doing things like creating a DatasetManagementResponseBody type just to fulfill data for DatasetManagementResponse.
On the surface, it would be nice if we could remove data from the abstraction and flatten the implementations. That would allow use to clean up certain parts of the code a great deal. However, the effects of such a change would be far reaching, and there could be something(s) that prohibits us from doing this. It is worth considering, but we must do so thoroughly and carefully.
The text was updated successfully, but these errors were encountered:
robertbartel
changed the title
Review design of Request class data field and flatten subtypes if possible
Review design of Response class data field and flatten subtypes if possible
Jun 7, 2023
See this comment from #331 for a bit of context.
The Response class has a
data
field that implementations must provided. Prior to adopting Pydantic,data
was just a dict. But the move to Pydantic required us to create full Pydantic BaseModel subtypes fordata
attributes. E.g., we end up doing things like creating a DatasetManagementResponseBody type just to fulfilldata
for DatasetManagementResponse.On the surface, it would be nice if we could remove
data
from the abstraction and flatten the implementations. That would allow use to clean up certain parts of the code a great deal. However, the effects of such a change would be far reaching, and there could be something(s) that prohibits us from doing this. It is worth considering, but we must do so thoroughly and carefully.The text was updated successfully, but these errors were encountered: