forked from loafle/openapi-generator-original
[haskell-http-client] Update haskell-http-client generator to Aeson 2.x (#12309)
* Update haskell-http-client generator to Aeson 2.x Co-authored-by: Andrea Cognolato <andrecogno@hotmail.it>
This commit is contained in:
@@ -79,7 +79,7 @@ data OpenAPIPetstoreConfig = OpenAPIPetstoreConfig
|
||||
, configLogContext :: LogContext -- ^ Configures the logger
|
||||
, configAuthMethods :: [AnyAuthMethod] -- ^ List of configured auth methods
|
||||
, configValidateAuthMethods :: Bool -- ^ throw exceptions if auth methods are not configured
|
||||
, configQueryExtraUnreserved :: B.ByteString -- ^ Configures additional querystring characters which must not be URI encoded, e.g. '+' or ':'
|
||||
, configQueryExtraUnreserved :: B.ByteString -- ^ Configures additional querystring characters which must not be URI encoded, e.g. '+' or ':'
|
||||
}
|
||||
|
||||
-- | display the config
|
||||
@@ -428,7 +428,7 @@ _applyAuthMethods req config@(OpenAPIPetstoreConfig {configAuthMethods = as}) =
|
||||
-- * Utils
|
||||
|
||||
-- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON)
|
||||
_omitNulls :: [(Text, A.Value)] -> A.Value
|
||||
_omitNulls :: [(A.Key, A.Value)] -> A.Value
|
||||
_omitNulls = A.object . P.filter notNull
|
||||
where
|
||||
notNull (_, A.Null) = False
|
||||
|
||||
Reference in New Issue
Block a user