swagger2-2.8.7: Swagger 2.0 data model
Safe HaskellNone
LanguageHaskell2010

Data.Swagger.Internal.AesonUtils

Synopsis

Generic functions

class AesonDefaultValue a where Source #

Minimal complete definition

Nothing

Instances

Instances details
AesonDefaultValue Text Source # 
Instance details

Defined in Data.Swagger.Internal.AesonUtils

AesonDefaultValue SecurityDefinitions Source # 
Instance details

Defined in Data.Swagger.Internal

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 (InsOrdHashSet k) Source # 
Instance details

Defined in Data.Swagger.Internal.AesonUtils

Methods

defaultValue :: Maybe (InsOrdHashSet k) 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

Methods

defaultValue :: Maybe (InsOrdHashMap k v) Source #

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

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

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

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

Options

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

Minimal complete definition

swaggerAesonOptions

Instances

Instances details
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