Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module representing a JSON-API resource object.
Specification: http://jsonapi.org/format/#document-resource-objects
- data Identifier = Identifier {}
- data Resource a b = Resource {
- getIdentifier :: Identifier
- getResource :: a
- getLinks :: Maybe Links
- getMetaData :: Maybe (Meta b)
- getRelationships :: Maybe (Map Text Relationship)
- data Relationship
- mkRelationship :: Maybe Identifier -> Maybe Links -> Maybe Relationship
Documentation
data Identifier Source #
Identifiers are used to encapsulate the minimum amount of information to uniquely identify a resource.
This object will be found at multiple levels of the JSON-API structure
Specification: http://jsonapi.org/format/#document-resource-identifier-objects
Type representing a JSON-API resource object.
A Resource supplies standardized data and metadata about a resource.
Specification: http://jsonapi.org/format/#document-resource-objects
Resource | |
|
data Relationship Source #
A type representing the Relationship between 2 entities
A Relationship provides basic information for fetching further information about a related resource.
Specification: http://jsonapi.org/format/#document-resource-object-relationships
mkRelationship :: Maybe Identifier -> Maybe Links -> Maybe Relationship Source #
Constructor function for creating a Relationship record
A relationship must contain either an Identifier or a Links record