mlabouardy/swaggymnia

Errors while generating yaml

Opened this issue · 7 comments

ram0l commented

Expected behavior

generate yaml

Current behavior

errors with fixed path to developers computer

Steps to reproduce the behavior

./swaggymnia generate -i pAPI.json -c config.json -o yaml

I'm running it on OSX and Linux (both specific releases for OSX and Linux) and i'm getting this:

panic: assignment to entry in nil map

goroutine 1 [running]:
main.parse(0xc420012ab0, 0x6, 0x3, 0xed232f9e0, 0xcfe6a80, 0x0, 0xc42000aba0, 0x1c, 0xc42001c600, 0xd, ...)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/swagger.go:51 +0x32c
main.(*Swagger).Generate(0xc4200c17d8, 0x7fff8db088d0, 0x9, 0x7fff8db088dd, 0xb, 0x7fff8db088ec, 0x4)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/swagger.go:83 +0x11f
main.main.func1(0xc4200669a0, 0x10100, 0xc4200669a0)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/app.go:57 +0x180
github.com/urfave/cli.HandleAction(0x5bd740, 0x608ba0, 0xc4200669a0, 0xc42004e300, 0x0)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/app.go:502 +0xd4
github.com/urfave/cli.Command.Run(0x5fb2c0, 0x8, 0x0, 0x0, 0xc420012860, 0x1, 0x1, 0x602cf6, 0x1e, 0x0, ...)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/command.go:210 +0xb87
github.com/urfave/cli.(*App).Run(0xc4200a41c0, 0xc42000e100, 0x8, 0x8, 0x0, 0x0)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/app.go:259 +0x7b7
main.main()
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/app.go:66 +0x515

I have the same issue, why doesn't seem anyone fix that error

Same here

same here, also for json

same here, but it worked until i used placeholder variables for requests in insomnia, so i guess it is caused by {{}} in the source file

Same here:

andreshg112@andreshg112-HP-240-G4-Notebook-PC:~/insomnia-exports$ swaggymnia generate -i sel-micro-video_2018-08-15.json -c config.json -o json
panic: assignment to entry in nil map

goroutine 1 [running]:
main.parse(0xc420012ae8, 0x6, 0x3, 0xed306492c, 0x2c588a00, 0x0, 0xc42000aee0, 0x1b, 0xc4200ec000, 0x17, ...)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/swagger.go:51 +0x32c
main.(*Swagger).Generate(0xc4200e17d8, 0x7ffe5186a218, 0x1f, 0x7ffe5186a23b, 0xb, 0x7ffe5186a24a, 0x4)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/swagger.go:83 +0x11f
main.main.func1(0xc420088840, 0x10100, 0xc420088840)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/app.go:57 +0x180
github.com/urfave/cli.HandleAction(0x5bd740, 0x608ba0, 0xc420088840, 0xc42006c300, 0x0)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/app.go:502 +0xd4
github.com/urfave/cli.Command.Run(0x5fb2c0, 0x8, 0x0, 0x0, 0xc420012890, 0x1, 0x1, 0x602cf6, 0x1e, 0x0, ...)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/command.go:210 +0xb87
github.com/urfave/cli.(*App).Run(0xc4200c21c0, 0xc42000e100, 0x8, 0x8, 0x0, 0x0)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/app.go:259 +0x7b7
main.main()
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/app.go:66 +0x515
andreshg112@andreshg112-HP-240-G4-Notebook-PC:~/insomnia-exports$ 

Same here

same here