jsonschema-gen-0.1.0.0: JSON Schema generator from Algebraic data type

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.JSON.Schema.Generator.Types

Synopsis

Documentation

data SchemaChoice Source

A sum encoding for ADT.

A smart consturctor for String.

Constructors

SCChoiceEnum

Encoding for constructors that are all unit type. e.g. "test": {"enum": ["xxx", "yyy", "zzz"]}

Fields

sctName :: !Text
 
sctTitle :: !Text
 
SCChoiceArray

Encoding for constructors that are non record type. e.g. "test": [{"tag": "xxx", "contents": []},...] or "test": [{"xxx": [],},...]

Fields

sctName :: !Text
 
sctTitle :: !Text
 
sctArray :: ![Schema]
 
SCChoiceMap

Encoding for constructos that are record type. e.g. "test": [{"tag": "xxx", "contents": {"aaa": "yyy",...}},...] or "test": [{"xxx": []},...]

Fields

sctName :: !Text
 
sctTitle :: !Text
 
sctMap :: ![(Text, Schema)]
 
sctRequired :: ![Text]
 

Instances

scString :: Schema Source

A smart consturctor for Integer.

scInteger :: Schema Source

A smart consturctor for Number.

scNumber :: Schema Source

A smart consturctor for Boolean.