Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getFromNamed :: forall a. FromJSON a => Proxy a -> Declare (Definitions Schema) NamedSchema
- getToNamed :: forall a. ToJSON a => Proxy a -> Declare (Definitions Schema) NamedSchema
- getFromRef :: forall a. FromJSON a => Proxy a -> Declare (Definitions Schema) (Referenced Schema)
- getToRef :: forall a. ToJSON a => Proxy a -> Declare (Definitions Schema) (Referenced Schema)
- newtype JordanFromJSONSchema a = JordanFromJSONSchema {}
- newtype JordanToJSONSchema a = JordanToJSONSchema {}
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
FromJSON a => FromJSON (JordanFromJSONSchema a) Source # | |
Defined in Jordan.OpenAPI fromJSON :: JSONParser f => f (JordanFromJSONSchema a) # | |
(Typeable a, FromJSON a) => ToSchema (JordanFromJSONSchema a) Source # | |
Defined in Jordan.OpenAPI |
newtype JordanToJSONSchema a Source #
Newtype for use with DerivingVia.
Allows deriving ToSchema
via DerivingVia, using the Jordan
defintion of ToJSON
.
Instances
ToJSON a => ToJSON (JordanToJSONSchema a) Source # | |
Defined in Jordan.OpenAPI toJSON :: JSONSerializer f => f (JordanToJSONSchema a) # | |
(Typeable a, ToJSON a) => ToSchema (JordanToJSONSchema a) Source # | |
Defined in Jordan.OpenAPI |