You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default implementation for toEncoding calls toJSON but there's no requirement for that to be the case. I ended up making my implementations diverge (to make it an error to call toJSON) which meant that the api itself worked but the tests did not pass.
Wondering if the tests here should actually call toEncoding
The text was updated successfully, but these errors were encountered:
I noticed recently that whilst servant's
MimRender JSON
callsencode
which callstoEncoding
however the swagger tests calltoJSON
.https://github.com/haskell-servant/servant/blob/master/servant/src/Servant/API/ContentTypes.hs#L334
https://github.com/GetShopTV/swagger2/blob/master/src/Data/Swagger/Internal/Schema/Validation.hs#L77
The default implementation for
toEncoding
callstoJSON
but there's no requirement for that to be the case. I ended up making my implementations diverge (to make it an error to call toJSON) which meant that the api itself worked but the tests did not pass.Wondering if the tests here should actually call toEncoding
The text was updated successfully, but these errors were encountered: