| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.JSON.Schema.Generator.Class
- 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 JSONSchemaGen a where Source
Minimal complete definition
Nothing
class JSONSchemaPrim a where Source
Methods
toSchemaPrim :: Options -> Proxy a -> Schema Source
Instances
| 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
Instances
| (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.
Constructors
| Options | |
Fields
| |
Constructors
| forall a . JSONSchemaPrim a => FieldType (Proxy a) |
defaultOptions :: Options Source
Default geerating Options:
Options{baseUri= "" ,schemaIdSuffix= "" ,refSchemaMap= Map.empty }