-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use `conlist` instead of `Tuple`s: Due to the way pydantic converts types to JSON types, Tuples are not converted to OpenAPI-compliant JSON types. Instead, conlist can be used to limit the length of the list and still comply with the desired effects in the actual use of the models. * Fields with constant values: These fields were not listed as required, nor was it known what the constant value was from the OpenAPI. This has been updated by adding the `pattern` attribute to Field, specifying the value wrapped in `^` and `$`. `pattern` is used instead of `regex`, because there is no need to add an extra validator. These fields mainly include `type`, but also `id`. Also, it seems from the pydantic documentation that the value of the `const` attribute of Field should be the same as the supplied `default` value. So this has been updated for all `const` attribute values. * Warning model better represented in OpenAPI: The `status` property is not part of the OPTIMAD Warning model, this has now been removed in the OpenAPI specification.
- Loading branch information
Showing
9 changed files
with
110 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.