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

Explore the option of sending partial entities as responses #28

Open
devraj opened this issue Aug 4, 2022 · 0 comments
Open

Explore the option of sending partial entities as responses #28

devraj opened this issue Aug 4, 2022 · 0 comments
Assignees

Comments

@devraj
Copy link
Member

devraj commented Aug 4, 2022

This is something I miss from my prestans days, we have a feature we called attribute_filters it essentially allowed us toggle the visibility of fields in responses. What this allowed is to use the same model for different use cases e.g:

  • List of users in the master view only needs, id, name, email
  • Clicking a user then loads the entire user including children model (this is the heavy weight use case)

Pydantic has the idea of excluding keys when it serializes content.

Explore and document:

  • if this is possible using the FastAPI + pydantic toolset
  • is this an OK thing to do according the OpenAPI specification
@devraj devraj self-assigned this Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant