swagger-server icon indicating copy to clipboard operation
swagger-server copied to clipboard

path.dirname called on non-string

Open gabor opened this issue 7 years ago • 0 comments

node6 throws an exception because of the line

https://github.com/BigstickCarpet/swagger-server/blob/master/lib/parser.js#L62

when the swagger variable is not a string. this happens when i give swagger-server an already parsed object. this is allowed as documented at https://github.com/BigstickCarpet/swagger-server/blob/master/lib/parser.js#L26

technically speaking this is wrong on node5 too, but there it seems path.dirname is fine with whatever parameter :)

gabor avatar Oct 18 '16 07:10 gabor