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

Evaluate pydantic #38

Open
letmaik opened this issue Jan 27, 2023 · 0 comments
Open

Evaluate pydantic #38

letmaik opened this issue Jan 27, 2023 · 0 comments

Comments

@letmaik
Copy link
Member

letmaik commented Jan 27, 2023

There's covjson-pydantic which uses pydantic to represent CovJSON's schema. pydantic allows including custom validation code and also supports exporting to JSON Schema. There may be an opportunity here to collaborate with covjson-pydantic such that the existing JSON Schema files are replaced by a dependency to that package and all further validation logic that can't be expressed in JSON Schema alone would go into that package.

Some unknows:

  • How much validation logic is supposed to be included in pydantic models? Since using it in servers (with FastAPI) is a main use case it seems like, as much as reasonably possible without affecting performance.
  • Does pydantic support all the constructs that are used in the current CovJSON schemas? My feeling is no, but listing them individually would help.

cc @PaulVanSchayck

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