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

Pydantic models for table json responses #645

Merged
merged 31 commits into from
Aug 1, 2023
Merged

Pydantic models for table json responses #645

merged 31 commits into from
Aug 1, 2023

Conversation

lukasjuhrich
Copy link
Collaborator

@lukasjuhrich lukasjuhrich commented Jul 2, 2023

The goal of this PR is to replace the dicts returned in the table JSON endpoints by pydantic models.
After having done this, frontend tests can utilize these models to validate responses and do easier introspection.

possible next issue:

  • pydantic models for /api endpoints

@lukasjuhrich
Copy link
Collaborator Author

note to self: perhaps I should restrict myself to tables; for simple json responses it may be overkill and redundant to add a pydantic model. tables are complex enough so that pydantic models pose an advantage.

@lukasjuhrich lukasjuhrich force-pushed the pydantic branch 2 times, most recently from 1775aa2 to 7e0408e Compare August 1, 2023 14:09
…except for the splitted table, which is a little more complicated
because it basically has two schemas at once (splitted and unsplitted).
web/blueprints/helpers/user.py Outdated Show resolved Hide resolved
web/table/table.py Outdated Show resolved Hide resolved
web/table/table.py Outdated Show resolved Hide resolved
web/blueprints/infrastructure/tables.py Outdated Show resolved Hide resolved
web/blueprints/user/__init__.py Outdated Show resolved Hide resolved
web/blueprints/user/__init__.py Outdated Show resolved Hide resolved
@lukasjuhrich lukasjuhrich changed the title Pydantic Pydantic models for table json responses Aug 1, 2023
@lukasjuhrich lukasjuhrich marked this pull request as ready for review August 1, 2023 16:12
@lukasjuhrich lukasjuhrich merged commit 53d0c59 into develop Aug 1, 2023
7 checks passed
@lukasjuhrich lukasjuhrich deleted the pydantic branch September 6, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant