Skip to content

responses

EntryInfoResponse (Success) pydantic-model

EntryResponseMany (Success) pydantic-model

EntryResponseOne (Success) pydantic-model

ErrorResponse (Response) pydantic-model

errors MUST be present and data MUST be skipped

data_must_be_skipped(values) classmethod

Source code in optimade/models/responses.py
@root_validator(pre=True)
def data_must_be_skipped(cls, values):
    if values.get("data", None) is not None:
        raise ValueError("data MUST be skipped for failures reporting errors")
    return values

IndexInfoResponse (Success) pydantic-model

InfoResponse (Success) pydantic-model

LinksResponse (EntryResponseMany) pydantic-model

ReferenceResponseMany (EntryResponseMany) pydantic-model

ReferenceResponseOne (EntryResponseOne) pydantic-model

StructureResponseMany (EntryResponseMany) pydantic-model

StructureResponseOne (EntryResponseOne) pydantic-model