Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- class JSONSchemaGen a where
- class JSONSchemaPrim a where
- toSchemaPrim :: Options -> Proxy a -> Schema
- class GJSONSchemaGen f where
- genericToSchema :: (Generic a, GJSONSchemaGen (Rep a)) => Options -> Proxy a -> Schema
- data Options = Options {}
- data FieldType = forall a . JSONSchemaPrim a => FieldType (Proxy a)
- defaultOptions :: Options
Documentation
class JSONSchemaPrim a where Source
toSchemaPrim :: Options -> Proxy a -> Schema Source
JSONSchemaPrim Bool | |
JSONSchemaPrim Double | |
JSONSchemaPrim Float | |
JSONSchemaPrim Int | |
JSONSchemaPrim Integer | |
JSONSchemaPrim String | |
(Typeable * a, JSONSchemaGen a) => JSONSchemaPrim a | |
JSONSchemaPrim UTCTime | |
JSONSchemaPrim Text | |
JSONSchemaPrim a => JSONSchemaPrim [a] | |
JSONSchemaPrim a => JSONSchemaPrim (Map String a) | |
JSONSchemaPrim a => JSONSchemaPrim (HashMap String a) |
class GJSONSchemaGen f where Source
(Datatype d, SchemaType f) => GJSONSchemaGen (D1 d f) |
genericToSchema :: (Generic a, GJSONSchemaGen (Rep a)) => Options -> Proxy a -> Schema Source
Options that specify how to generate schema definition automatically from your datatype.
Options | |
|
forall a . JSONSchemaPrim a => FieldType (Proxy a) |
defaultOptions :: Options Source
Default geerating Options
:
Options
{baseUri
= "" ,schemaIdSuffix
= "" ,refSchemaMap
= Map.empty }