links¶
LinksResource (EntryResource)
pydantic-model
¶
A Links endpoint resource object
relationships_must_not_be_present(values)
classmethod
¶
Source code in optimade/models/links.py
@root_validator(pre=True)
def relationships_must_not_be_present(cls, values):
if values.get("relationships", None) is not None:
raise ValueError('"relationships" is not allowed for links resources')
return values
LinksResourceAttributes (Attributes)
pydantic-model
¶
Links endpoint resource object attributes
aggregate: Aggregate
pydantic-field
¶
A string indicating whether a client that is following links to aggregate results from different OPTIMADE implementations should follow this link or not. This flag SHOULD NOT be indicated for links where link_type
is not child
.
If not specified, clients MAY assume that the value is ok
. If specified, and the value is anything different than ok
, the client MUST assume that the server is suggesting not to follow the link during aggregation by default (also if the value is not among the known ones, in case a future specification adds new accepted values).
Specific values indicate the reason why the server is providing the suggestion. A client MAY follow the link anyway if it has reason to do so (e.g., if the client is looking for all test databases, it MAY follow the links marked with aggregate
=test
).
If specified, it MUST be one of the values listed in section Link Aggregate Options.
base_url: Union[pydantic.networks.AnyUrl, optimade.models.jsonapi.Link]
pydantic-field
required
¶
JSON API links object, pointing to the base URL for this implementation
description: str
pydantic-field
required
¶
Human-readable description for the OPTIMADE API implementation, e.g., for use in clients to show a description to the end-user.
homepage: Union[pydantic.networks.AnyUrl, optimade.models.jsonapi.Link]
pydantic-field
required
¶
JSON API links object, pointing to a homepage URL for this implementation
link_type: LinkType
pydantic-field
required
¶
The type of the linked relation. MUST be one of these values: 'child', 'root', 'external', 'providers'.
name: str
pydantic-field
required
¶
Human-readable name for the OPTIMADE API implementation, e.g., for use in clients to show the name to the end-user.
no_aggregate_reason: str
pydantic-field
¶
An OPTIONAL human-readable string indicating the reason for suggesting not to aggregate results following the link. It SHOULD NOT be present if aggregate
=ok
.