Skip to content

Evaluate pydantic #38

@letmaik

Description

@letmaik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions