Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[haskell-http-client] Update haskell-http-client generator to Aeson 2.x #11535

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ data {{configType}} = {{configType}}
, 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
Expand Down Expand Up @@ -419,7 +419,7 @@ _applyAuthMethods req config@({{configType}} {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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ library
lib
ghc-options: -Wall -funbox-strict-fields
build-depends:
aeson >=1.0 && <2.0
aeson >=2.0 && <3.0
, base >=4.7 && <5.0
, base64-bytestring >1.0 && <2.0
, bytestring >=0.10.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ library
lib
ghc-options: -Wall -funbox-strict-fields
build-depends:
aeson >=1.0 && <2.0
aeson >=2.0 && <3.0
, base >=4.7 && <5.0
, base64-bytestring >1.0 && <2.0
, bytestring >=0.10.0
Expand Down