Skip to content

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 (EntryResourceAttributes) pydantic-model

Generic model for creating new entry resources in the MongoDB

id: str pydantic-field

Config

Silently discard extra initiation keys.

extra

__init__(self, **data) special

Remove root_validator check_illegal_attributes_fields.

Source code in optimade_gateway/models/resources.py
def __init__(self, **data: Any) -> None:
    """Remove root_validator `check_illegal_attributes_fields`."""
    self._remove_pre_root_validators()
    super().__init__(**data)
Back to top