resources¶
Pydantic models/schemas for entry-endpoint resources.
This module is mainly used for a special pydantic base model, which can be used as a mix-in class when creating entry-endpoint resources.
EntryResourceCreate
¶
Bases: EntryResourceAttributes
Generic model for creating new entry resources in the MongoDB
Source code in optimade_gateway/models/resources.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
id: Optional[str]
class-attribute
¶
last_modified: Optional[datetime]
class-attribute
¶
Config
¶
Silently discard extra initiation keys.
Source code in optimade_gateway/models/resources.py
20 21 22 23 |
|
extra = 'ignore'
class-attribute
¶
__init__(**data)
¶
Remove root_validator check_illegal_attributes_fields
.
Source code in optimade_gateway/models/resources.py
36 37 38 39 |
|