schemas-0.3.0: schema guided serialization

Safe HaskellNone
LanguageHaskell2010

Schemas.OpenApi2

Description

This module defines a TypedSchema for the Schema datatype, inspired in the OpenApi 2.0 specification, which may be useful to render Schema values in OpeApi 2.0 format

Synopsis

Documentation

data OpenApi2Schema Source #

The representation of an OpenApi 2.0 schema

Instances
Show OpenApi2Schema Source # 
Instance details

Defined in Schemas.OpenApi2

Generic OpenApi2Schema Source # 
Instance details

Defined in Schemas.OpenApi2

Associated Types

type Rep OpenApi2Schema :: Type -> Type #

Generic OpenApi2Schema Source # 
Instance details

Defined in Schemas.OpenApi2

Associated Types

type Code OpenApi2Schema :: [[Type]] #

HasDatatypeInfo OpenApi2Schema Source # 
Instance details

Defined in Schemas.OpenApi2

HasSchema OpenApi2Schema Source # 
Instance details

Defined in Schemas.OpenApi2

type Rep OpenApi2Schema Source # 
Instance details

Defined in Schemas.OpenApi2

type Code OpenApi2Schema Source # 
Instance details

Defined in Schemas.OpenApi2

type DatatypeInfoOf OpenApi2Schema Source # 
Instance details

Defined in Schemas.OpenApi2

data OpenApi2Options Source #

Constructors

OpenApi2Options 

Fields

encodeAsOpenApi2Document :: OpenApi2Options -> Text -> Schema -> Value Source #

Given a schema free of undiscriminated unions encodeAsOpenApi2Document name schema produces an encoding of an OpenApi2 document that models the given schema. Failures are omitted, use toOpenApi2Document if you care.