openapi3-3.2.2: OpenAPI 3.0 data model
Safe HaskellNone
LanguageHaskell2010

Data.OpenApi.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.OpenApi.Internal.AesonUtils

AesonDefaultValue SecurityDefinitions Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue SecuritySchemeType Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue OAuth2AuthorizationCodeFlow Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue OAuth2ClientCredentialsFlow Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue OAuth2PasswordFlow Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue OAuth2ImplicitFlow Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue Responses Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue ParamLocation Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue OpenApiType Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue Link Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue MimeList Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue Components Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue Server Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue Info Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue [a] Source # 
Instance details

Defined in Data.OpenApi.Internal.AesonUtils

Methods

defaultValue :: Maybe [a] Source #

AesonDefaultValue (Maybe a) Source # 
Instance details

Defined in Data.OpenApi.Internal.AesonUtils

AesonDefaultValue (Set a) Source # 
Instance details

Defined in Data.OpenApi.Internal.AesonUtils

Methods

defaultValue :: Maybe (Set a) Source #

AesonDefaultValue (InsOrdHashSet k) Source # 
Instance details

Defined in Data.OpenApi.Internal.AesonUtils

AesonDefaultValue p => AesonDefaultValue (OAuth2Flow p) Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue (InsOrdHashMap k v) Source # 
Instance details

Defined in Data.OpenApi.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

Instances details
HasSwaggerAesonOptions SecurityScheme Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions OAuth2Flows Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Header Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Response Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Responses Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Schema Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Link Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Example Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Param Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Encoding Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions MediaTypeObject Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions RequestBody Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Operation Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions PathItem Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Components Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions Server Source # 
Instance details

Defined in Data.OpenApi.Internal

HasSwaggerAesonOptions OpenApi Source # 
Instance details

Defined in Data.OpenApi.Internal

AesonDefaultValue p => HasSwaggerAesonOptions (OAuth2Flow p) Source # 
Instance details

Defined in Data.OpenApi.Internal