openapi3-3.2.3: OpenAPI 3.0 data model
Safe Haskell None
Language Haskell2010

Data.OpenApi.Internal.TypeShape

Synopsis

Documentation

data TypeShape Source #

Shape of a datatype.

Constructors

Enumeration

A simple enumeration.

SumOfProducts

A product or a sum of non-unit products.

Mixed

Mixed sum type with both unit and non-unit constructors.

type family GenericHasSimpleShape t (f :: Symbol ) (s :: TypeShape ) :: Constraint where ... Source #

Equations

GenericHasSimpleShape t f Enumeration = ()
GenericHasSimpleShape t f SumOfProducts = ()
GenericHasSimpleShape t f Mixed = TypeError (((((( Text "Cannot derive Generic-based Swagger Schema for " :<>: ShowType t) :$$: ( ShowType t :<>: Text " is a mixed sum type (has both unit and non-unit constructors).")) :$$: Text "Swagger does not have a good representation for these types.") :$$: (( Text "Use " :<>: Text f) :<>: Text " if you want to derive schema")) :$$: Text "that matches aeson's Generic-based toJSON,") :$$: Text "but that's not supported by some Swagger tools.")