json-schema-0.7.4.1: Types and type classes for defining JSON schemas.

Safe HaskellNone
LanguageHaskell98

Data.JSON.Schema.Generic

Description

Generic derivation of schemas. The schemas generated match the JSON generated by type 'generic-aeson' package. See that package for documentation on the format and examples of it.

Synopsis

Documentation

class GJSONSchema f #

Minimal complete definition

gSchema'

Instances

GJSONSchema (U1 *) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * (U1 * a) -> Schema

GJSONSchema (K1 * i String) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * (K1 * i String a) -> Schema

JSONSchema c => GJSONSchema (K1 * i c) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * (K1 * i c a) -> Schema

(GJSONSchema f, GJSONSchema g) => GJSONSchema ((:+:) * f g) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * ((* :+: f) g a) -> Schema

(GJSONSchema f, GJSONSchema g) => GJSONSchema ((:*:) * f g) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * ((* :*: f) g a) -> Schema

GJSONSchema f => GJSONSchema (M1 * D c f) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * (M1 * D c f a) -> Schema

(Constructor Meta c, GJSONSchema f) => GJSONSchema (M1 * C c f) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * (M1 * C c f a) -> Schema

(Selector Meta c, GJSONSchema f) => GJSONSchema (M1 * S c f) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * (M1 * S c f a) -> Schema

Selector Meta c => GJSONSchema (M1 * S c (K1 * i (Maybe String))) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * (M1 * S c (K1 * i (Maybe String)) a) -> Schema

(Selector Meta c, JSONSchema a) => GJSONSchema (M1 * S c (K1 * i (Maybe a))) # 

Methods

gSchema' :: Settings -> Bool -> [Text] -> Proxy * (M1 * S c (K1 * i (Maybe a)) a) -> Schema

gSchema :: (Generic a, GJSONSchema (Rep a), ConNames (Rep a), GIsEnum (Rep a)) => Proxy a -> Schema #

Derive a JSON schema for types with an instance of Generic.