servant-purescript 0.9.0.1 → 0.9.0.2
raw patch · 2 files changed
+10/−4 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Servant.PureScript.Internal: pName :: forall f_ad5M. Lens' (Param f_ad5M) ParamName
+ Servant.PureScript.Internal: pName :: forall f_addm. Lens' (Param f_addm) ParamName
- Servant.PureScript.Internal: pType :: forall f_ad5M f_ahCt. Lens (Param f_ad5M) (Param f_ahCt) f_ad5M f_ahCt
+ Servant.PureScript.Internal: pType :: forall f_addm f_ahK3. Lens (Param f_addm) (Param f_ahK3) f_addm f_ahK3
Files
servant-purescript.cabal view
@@ -1,5 +1,5 @@ name: servant-purescript-version: 0.9.0.1+version: 0.9.0.2 synopsis: Generate PureScript accessor functions for you servant API description: Please see README.md homepage: https://github.com/eskimor/servant-purescript#readme
src/Servant/PureScript/CodeGen.hs view
@@ -127,10 +127,16 @@ Nothing -> "}" Just _ -> ", content =" <+> "toNullable <<< Just <<< stringify <<< encodeJson $ reqBody" </> "}" )- </> "affResp <- affjax affReq"- </> "let decodeJson = case spOpts_.decodeJson of SPSettingsDecodeJson_ d -> d"- </> "getResult affReq decodeJson affResp"+ </> if shallParseBody (req^.reqReturnType)+ then "affResp <- affjax affReq"+ </> "let decodeJson = case spOpts_.decodeJson of SPSettingsDecodeJson_ d -> d"+ </> "getResult affReq decodeJson affResp"+ else "_ <- affjax affReq"+ </> "pure unit" ) <> line+ where+ shallParseBody Nothing = False+ shallParseBody (Just t) = t^.typeName /= "Unit" genBuildURL :: Url PSType -> Doc genBuildURL url = psVar baseURLId <+> "<>"