ahultgren / swagger-elm

Generate Elm types and decoders based on a Swagger file
74 stars 9 forks source link

Error: missing path in request #4

Closed Frituurpanda closed 7 years ago

Frituurpanda commented 7 years ago

After default installation on macOS and trying "cat swagger.json | swagger-to-elm | elm-format --stdin" I got the following error: {"error":"Missing { path } in request"}%. Can't really find where the problem lies after debugging a bit. Could you maybe help shine some light on how to get the project to work?

ahultgren commented 7 years ago

It sounds like the problem is in the swagger file. Do you have a minimal working example of the swagger to reproduce the error?

Frituurpanda commented 7 years ago

I've tried it on the swagger file in the swagger-elm project and on some other files, all with the same result. Can you maybe try it on the default swagger in the project?

ahultgren commented 7 years ago

Hm, I just tried and it worked... I also tried a fresh install and it worked too. Are you using the latest version of node?

Frituurpanda commented 7 years ago

Interesting, maybe that's the issue. I'm running "node --version v7.5.0" You?

ahultgren commented 7 years ago

Same. This is weird. Do you get the same error running just cat swagger.json | swagger-to-elm?

Frituurpanda commented 7 years ago

Yeah. Just ran it on two machines and got the same result: "cat swagger.json | swagger-to-elm {"error":"Missing { path } in request"}%" I'm think i'm missing something, not sure what yet..

Frituurpanda commented 7 years ago

This issue was solved by uninstalling the default elm-stdio and installing the authors elm-stdio (ahultgren/node-elm-stdio) instead.