swagger2-2.3.1: Swagger 2.0 data model

Safe HaskellNone
LanguageHaskell2010

Data.Swagger.Internal.AesonUtils

Contents

Synopsis

Generic functions

class AesonDefaultValue a where Source #

Minimal complete definition

Nothing

Instances
AesonDefaultValue Text Source # 
Instance details

Defined in Data.Swagger.Internal.AesonUtils

AesonDefaultValue SecuritySchemeType Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue OAuth2Flow Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue Responses Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue ParamLocation Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue ParamAnySchema Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue MimeList Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue Info Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue [a] Source # 
Instance details

Defined in Data.Swagger.Internal.AesonUtils

Methods

defaultValue :: Maybe [a] Source #

AesonDefaultValue (Maybe a) Source # 
Instance details

Defined in Data.Swagger.Internal.AesonUtils

AesonDefaultValue (Set a) Source # 
Instance details

Defined in Data.Swagger.Internal.AesonUtils

Methods

defaultValue :: Maybe (Set a) Source #

AesonDefaultValue (ParamSchema s) Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue (SwaggerType a) Source # 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue (InsOrdHashMap k v) Source # 
Instance details

Defined in Data.Swagger.Internal.AesonUtils

sopSwaggerGenericToJSON :: forall a xs. (HasDatatypeInfo a, HasSwaggerAesonOptions a, All2 ToJSON (Code a), All2 Eq (Code a), Code a ~ '[xs]) => a -> Value Source #

Generic serialisation for swagger records.

Features

  • omits nulls, empty objects and empty arrays (configurable)
  • possible to add fields
  • possible to merge sub-object

sopSwaggerGenericToJSONWithOpts :: forall a xs. (Generic a, All2 AesonDefaultValue (Code a), HasDatatypeInfo a, All2 ToJSON (Code a), All2 Eq (Code a), Code a ~ '[xs]) => SwaggerAesonOptions -> a -> Value Source #

  • TODO:* This is only used by ToJSON (ParamSchema SwaggerKindSchema)

Also uses default aesonDefaults

Options

class (Generic a, All2 AesonDefaultValue (Code a)) => HasSwaggerAesonOptions a where Source #

Minimal complete definition

swaggerAesonOptions

Instances
HasSwaggerAesonOptions SecurityScheme Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions OAuth2Params Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions Header Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions Response Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions Responses Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions Schema Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions ParamOtherSchema Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions Param Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions Operation Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions PathItem Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions Swagger Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions (ParamSchema (SwaggerKindNormal t)) Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions (ParamSchema (SwaggerKindParamOtherSchema :: SwaggerKind Type)) Source # 
Instance details

Defined in Data.Swagger.Internal

HasSwaggerAesonOptions (ParamSchema (SwaggerKindSchema :: SwaggerKind Type)) Source # 
Instance details

Defined in Data.Swagger.Internal