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 example instructions for creating a client and a server in README.md don't work OOTB. Not for client nor server.
Swagger-codegen version
v2.2.2 or latest master, doesn't matter.
Swagger declaration file content or url
Tried with both a large/complex company-private Swagger, and the Petstore sample: sh ./bin/haskell-servant-petstore.sh cd samples/server/petstore/haskell-servant
Same results either way.
Steps to reproduce
git clone https://github.com/swagger-api/swagger-codegen && cd swagger-codegen
Create a Main.hs file and try to import/use the generated client or server using the example code from the README.md, i.e:
{-# LANGUAGE RecordWildCards #-}
module Main where
import SwaggerPetstore.API
main :: IO ()
main = do
SwaggerPetstoreBackend{..} <- createSwaggerPetstoreClient (ServerConfig "localhost" 8080)
return ()
Results
Main.hs:9:33:Couldn't match expected type‘ServerConfig->IO (SwaggerPetstoreBackend t0)’
with actual type‘SwaggerPetstoreBackendSwaggerPetstoreClient’The function ‘createSwaggerPetstoreClient’
is applied to one argument,
but its type‘SwaggerPetstoreBackendSwaggerPetstoreClient’
has none
In a stmt of a 'do' block:SwaggerPetstoreBackend {..} <- createSwaggerPetstoreClient
(ServerConfig"localhost"8080)
In the expression:do { SwaggerPetstoreBackend {..} <- createSwaggerPetstoreClient
(ServerConfig"localhost"8080);
return() }
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Description
The example instructions for creating a client and a server in README.md don't work OOTB. Not for client nor server.
Swagger-codegen version
v2.2.2
or latestmaster
, doesn't matter.Swagger declaration file content or url
Tried with both a large/complex company-private Swagger, and the Petstore sample:
sh ./bin/haskell-servant-petstore.sh
cd samples/server/petstore/haskell-servant
Same results either way.
Steps to reproduce
git clone https://github.com/swagger-api/swagger-codegen && cd swagger-codegen
git checkout origin master && git pull origin master --rebase
mvn clean package
sh ./bin/haskell-servant-petstore.sh
cd samples/server/petstore/haskell-servant
stack install
Main.hs
file and try to import/use the generated client or server using the example code from theREADME.md
, i.e:Results
The text was updated successfully, but these errors were encountered: