Skip to content

Commit 76989db

Browse files
authored
[haskell] fix exampe code in generated README.md (#16142)
* [haskell] fix exampe code in generated README.md Since create{{title}}Client is not a monadic action, we need to use "let" instead of "<-". * regenerate samples
1 parent bd76c1b commit 76989db

File tree

2 files changed

+2
-2
lines changed
  • modules/openapi-generator/src/main/resources/haskell-servant
  • samples/server/petstore/haskell-servant

2 files changed

+2
-2
lines changed

modules/openapi-generator/src/main/resources/haskell-servant/README.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ main = do
5050
manager <- newManager tlsManagerSettings
5151

5252
-- Create the client (all endpoint functions will be available)
53-
{{title}}Backend{..} <- API.create{{title}}Client
53+
let {{title}}Backend{..} = API.create{{title}}Client
5454

5555
-- Any {{title}} API call can go here, e.g. here we call `getSomeEndpoint`
5656
API.call{{title}} (mkClientEnv manager url) getSomeEndpoint

samples/server/petstore/haskell-servant/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ main = do
5050
manager <- newManager tlsManagerSettings
5151
5252
-- Create the client (all endpoint functions will be available)
53-
OpenAPIPetstoreBackend{..} <- API.createOpenAPIPetstoreClient
53+
let OpenAPIPetstoreBackend{..} = API.createOpenAPIPetstoreClient
5454
5555
-- Any OpenAPIPetstore API call can go here, e.g. here we call `getSomeEndpoint`
5656
API.callOpenAPIPetstore (mkClientEnv manager url) getSomeEndpoint

0 commit comments

Comments
 (0)