Module jsonapi_rs::api
source · Expand description
Defines custom types and structs primarily that composite the JSON:API document
Structs
- A struct that defines properties for a JSON:API document that contains no errors
- A struct that defines an error state for a JSON:API document
- Error location
- Retpresentation of a JSON:API error (all fields are optional)
- Optional
JsonApiDocument
payload identifying the JSON-API version the server implements - Pagination links
- Relationship with another object
- Representation of a JSON:API resource. This is a struct that contains attributes that map to the JSON:API specification of
id
,type
,attributes
,relationships
,links
, andmeta
- Resource Identifier
Enums
- Enum to describe top-level JSON:API specification violations
- Valid Resource Identifier (can be None)
- An enum that defines the possible composition of a JSON:API document - one which contains
error
ordata
- but not both. Rely on Rust’s type system to handle this basic validation instead of running validators on parsed documents - Valid data Resource (can be None)
Type Aliases
- Side-loaded Resources
- Data-related errors
- Permitted JSON-API values (all JSON Values)
- Meta-data object, can contain any data
- Map of relationships with other objects
- Resource Attributes, can be any JSON value
- Vector of
ResourceIdentifiers
- Vector of
Resource