-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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] compare rendered form in PropMime #2345
Conversation
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
It does change what's being tested — a renderer that drops fields wouldn't be caught. But since it avoids the inverse issue, what I'd accept is simply leaving the existing also, to avoid escaping the output in
|
Good point about dropping fields. Now I don't feel this is a good change. I'm thinking maybe we can define another type class Eq1 which has the same instances as Eq but equalizes |
I'm in favor of another solution too.
I was going down this road with
since One option I know how to do is simply modifying the instance we do have defined ( But if you have any ideas how to achieve the options you mentioned, i'd be for them. |
playing around with Aeson a bit,
but I'll play around with it and see if it roundtrips successfully. if it's possible to just exclude the scenario in the test module that would be ideal imho |
Generating
|
Nice. I'll look into "only doing it for Value" tomorrow |
@guoshimin I updated my PR #2343 in include c00321c which adds It seems to work as you described, and tests passed with the kubernetes spec (https://gist.github.com/jonschoning/45b7223ed72fd8cf6b6a2b0e5de246e1). if it looks good to you i'll merge PR #2343 in with the change |
Works perfectly. Thanks! |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
,./bin/security/{LANG}-petstore.sh
and./bin/openapi3/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,. Default:3.4.x
,4.0.x
master
.Description of the PR
It is known that
fromJson
andtoJson
forMaybe
are not the inverse of each other: haskell/aeson#376. It causes failures in the PropMime tests.Changing the PropMime tests to compared the rendered form instead.
@jonschoning, what do you think?