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

Fix field optonality inconsistency in schema #482

Merged
merged 1 commit into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2998,6 +2998,8 @@
"chemical_formula_reduced",
"chemical_formula_anonymous",
"dimension_types",
"nperiodic_dimensions",
"lattice_vectors",
"cartesian_site_positions",
"nsites",
"species",
Expand Down
10 changes: 4 additions & 6 deletions optimade/models/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ class StructureResourceAttributes(EntryResourceAttributes):
- For a bulk 3D system: `[1, 1, 1]`""",
)

nperiodic_dimensions: Optional[int] = Field(
None,
nperiodic_dimensions: int = Field(
...,
description="""An integer specifying the number of periodic dimensions in the structure, equivalent to the number of non-zero entries in `dimension_types`.

- **Type**: integer
Expand All @@ -416,10 +416,8 @@ class StructureResourceAttributes(EntryResourceAttributes):
- Match all structures with 2 or fewer periodic dimensions: `nperiodic_dimensions<=2`""",
)

lattice_vectors: Optional[
conlist(Vector3D_unknown, min_items=3, max_items=3)
] = Field(
None,
lattice_vectors: conlist(Vector3D_unknown, min_items=3, max_items=3) = Field(
...,
description="""The three lattice vectors in Cartesian coordinates, in ångström (Å).

- **Type**: list of list of floats or unknown values.
Expand Down