jordan-openapi-0.2.0.0: OpenAPI Definitions for Jordan, Automatically
Safe HaskellNone
LanguageHaskell2010

Jordan.OpenAPI

Synopsis

Documenting FromJSON Schemas

getFromNamed :: forall a. FromJSON a => Proxy a -> Declare (Definitions Schema) NamedSchema Source #

Get documentation for a type that implements FromJSON, in the Declare environment.

This will be inline documention, IE, it will be named but not stored in the schema definitions.

getToNamed :: forall a. ToJSON a => Proxy a -> Declare (Definitions Schema) NamedSchema Source #

Get documentation for a type that implements ToJSON.

This will be inline documentation, IE, it will be named but not stored in the schema definitions.

Documenting ToJSON schemas

getFromRef :: forall a. FromJSON a => Proxy a -> Declare (Definitions Schema) (Referenced Schema) Source #

Get documention for a type that implements FromJSON.

This will store the type in the schemas key of the schema definitions, and give back a reference to it.

getToRef :: forall a. ToJSON a => Proxy a -> Declare (Definitions Schema) (Referenced Schema) Source #

Get documentation for a type that implements ToJSON.

This will store the type in the schemas key of the schemas definitions, then give back a reference to it.

Newtype wrappers for DerivingVia

newtype JordanFromJSONSchema a Source #

Newtype for use with DerivingVia.

Allows deriving ToSchema via DerivingVia, using the Jordan defintion of ToJSON.

Instances

Instances details
FromJSON a => FromJSON (JordanFromJSONSchema a) Source # 
Instance details

Defined in Jordan.OpenAPI

(Typeable a, FromJSON a) => ToSchema (JordanFromJSONSchema a) Source # 
Instance details

Defined in Jordan.OpenAPI

newtype JordanToJSONSchema a Source #

Newtype for use with DerivingVia.

Allows deriving ToSchema via DerivingVia, using the Jordan defintion of ToJSON.

Constructors

JordanToJSONSchema 

Instances

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

Defined in Jordan.OpenAPI

(Typeable a, ToJSON a) => ToSchema (JordanToJSONSchema a) Source # 
Instance details

Defined in Jordan.OpenAPI