[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:
Jon Schoning
2022-05-07 17:53:52 -05:00
committed by GitHub
parent aac6ce2302
commit 8511ce360c
71 changed files with 7682 additions and 6703 deletions

View File

@@ -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