Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review design of Response class data field and flatten subtypes if possible #347

Open
robertbartel opened this issue Jun 7, 2023 · 0 comments
Labels
enhancement New feature or request maas MaaS Workstream question Further information is requested

Comments

@robertbartel
Copy link
Contributor

robertbartel commented 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 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.

@robertbartel robertbartel added enhancement New feature or request question Further information is requested maas MaaS Workstream labels Jun 7, 2023
@robertbartel robertbartel mentioned this issue Jun 7, 2023
@robertbartel 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maas MaaS Workstream question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant