servant-hateoas-0.1.1: HATEOAS extension for servant
Safe HaskellSafe-Inferred
LanguageGHC2021

Servant.Hateoas.ContentType.HAL

Synopsis

Documentation

data HAL (t :: Type) Source #

Data-Kind representing Content-Types with Hypertext Application Language (HAL).

Type parameter t is the mime type suffix in application/hal+t.

Instances

Instances details
(Related a, HasField (IdSelName a) a id, IsElem (GetOneApi a) api, HasLink (GetOneApi a), MkLink (GetOneApi a) Link ~ (id -> Link), BuildRels api (Relations a) a, HasResource (HAL t)) => ToResource (HAL t :: Type) (api :: Type) a Source # 
Instance details

Defined in Servant.Hateoas.ContentType.HAL

Methods

toResource :: Proxy (HAL t) -> Proxy api -> a -> Resource (HAL t) a Source #

Accept (HAL JSON) Source # 
Instance details

Defined in Servant.Hateoas.ContentType.HAL

HasResource (HAL t :: Type) Source # 
Instance details

Defined in Servant.Hateoas.ContentType.HAL

Associated Types

type Resource (HAL t) :: Type -> Type Source #

type Resource (HAL t :: Type) Source # 
Instance details

Defined in Servant.Hateoas.ContentType.HAL

data HALResource a Source #

Resource wrapper for HAL.

Constructors

HALResource 

Instances

Instances details
ToJSON a => ToJSON (HALResource a) Source # 
Instance details

Defined in Servant.Hateoas.ContentType.HAL

(ToJSON a, Related a, KnownSymbol (CollectionName a)) => ToJSON [HALResource a] Source # 
Instance details

Defined in Servant.Hateoas.ContentType.HAL

Generic (HALResource a) Source # 
Instance details

Defined in Servant.Hateoas.ContentType.HAL

Associated Types

type Rep (HALResource a) :: Type -> Type #

Methods

from :: HALResource a -> Rep (HALResource a) x #

to :: Rep (HALResource a) x -> HALResource a #

type Rep (HALResource a) Source # 
Instance details

Defined in Servant.Hateoas.ContentType.HAL

type Rep (HALResource a) = D1 ('MetaData "HALResource" "Servant.Hateoas.ContentType.HAL" "servant-hateoas-0.1.1-inplace" 'False) (C1 ('MetaCons "HALResource" 'PrefixI 'True) (S1 ('MetaSel ('Just "resource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Just "links") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(String, Link)]) :*: S1 ('MetaSel ('Just "embedded") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(String, SomeToJSON HALResource)]))))