You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have time for a full explanation (perhaps @ltalirz/@dwinston can elaborate), but we still have issues in constraining e.g. the lengths of lists in a way that is compatible with both pydantic and FastAPI.
Currently we have conlist which has just been released in pydantic, but has no effect on the generated API pydantic/pydantic/issues/604. It is not clear whether the types inside the conlist can be constrained, as of yet.
We also need a way to constrain lists of lists, e.g. ensuring lattice vectors are always 3x3, and if possible, constraining e.g. cartesian_site_positions to have length nsites, in order to fully validate a JSON response against the spec.
Some additional discussion can be found in the comments to #45.
The text was updated successfully, but these errors were encountered:
I don't have time for a full explanation (perhaps @ltalirz/@dwinston can elaborate), but we still have issues in constraining e.g. the lengths of lists in a way that is compatible with both pydantic and FastAPI.
Currently we have
conlist
which has just been released in pydantic, but has no effect on the generated API pydantic/pydantic/issues/604. It is not clear whether the types inside theconlist
can be constrained, as of yet.We also need a way to constrain lists of lists, e.g. ensuring lattice vectors are always 3x3, and if possible, constraining e.g.
cartesian_site_positions
to have lengthnsites
, in order to fully validate a JSON response against the spec.Some additional discussion can be found in the comments to #45.
The text was updated successfully, but these errors were encountered: