fetch-swagger-schema icon indicating copy to clipboard operation
fetch-swagger-schema copied to clipboard

TypeError: Cannot read property 'length' of undefined

Open bendavis78 opened this issue 9 years ago • 3 comments

I'm getting this error:

$ fetch-swagger-schema http://petstore.swagger.io/v2/swagger.json petstore.json
[TypeError: Cannot read property 'length' of undefined]

bendavis78 avatar Jan 12 '16 04:01 bendavis78

petstore upgraded to swagger 2.0 schema. most tools still generate 1.2, so it should work on your own (at least it did for my project with grape-swagger :)

patcon avatar Jan 17 '16 09:01 patcon

I am getting the same thing. Node swagger express is using 2.0 now.

lindenle avatar Jan 21 '16 17:01 lindenle

Ah, then this tool won't work for you @lindenle -- it's v1.2 only

I thought there was another ticket somewhere (where the tool suite author spoke of v2 plan), but this is the best I found: https://github.com/signalfx/swagger-client-generator/issues/12

patcon avatar Jan 21 '16 19:01 patcon