Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Development]Met error after executing 'make all' #309

Closed
jerryion opened this issue Nov 29, 2019 · 1 comment · Fixed by #311
Closed

[Development]Met error after executing 'make all' #309

jerryion opened this issue Nov 29, 2019 · 1 comment · Fixed by #311

Comments

@jerryion
Copy link

jerryion commented Nov 29, 2019

Met error after executing 'make all' under main folder.

Expected Behavior

Install dependencies, generated code, and run the app

Current Behavior

Running verify_swagger
panic: Invalid schema provided to SchemaValidator: object has no key "default"

goroutine 1 [running]:
github.com/go-openapi/validate.NewSchemaValidator(0xc0001a26c0, 0x19085a0, 0xc0001a26c0, 0x0, 0x0, 0x1aaa760, 0xc0003bc240, 0x0, 0x0, 0x0, ...)
	/Users/pumpkinyang/go/pkg/mod/github.com/go-openapi/validate@v0.19.2/schema.go:72 +0x1039
github.com/go-openapi/validate.(*SpecValidator).Validate(0xc00015a480, 0x18bbec0, 0xc0003fe050, 0xc000290000, 0xc0002900b0)
	/Users/pumpkinyang/go/pkg/mod/github.com/go-openapi/validate@v0.19.2/spec.go:92 +0x216
github.com/go-swagger/go-swagger/cmd/swagger/commands.(*ValidateSpec).Execute(0xc00046afb0, 0xc00000ff40, 0x1, 0x2, 0xc00046afb0, 0x1)
	/Users/pumpkinyang/go/pkg/mod/github.com/go-swagger/go-swagger@v0.20.1/cmd/swagger/commands/validate.go:60 +0x14e
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc000043800, 0xc0000b4190, 0x2, 0x2, 0x0, 0x1957631, 0x2a, 0x17d5540, 0xc00024d950)
	/Users/pumpkinyang/go/pkg/mod/github.com/jessevdk/go-flags@v1.4.0/parser.go:316 +0x8dc
github.com/jessevdk/go-flags.(*Parser).Parse(...)
	/Users/pumpkinyang/go/pkg/mod/github.com/jessevdk/go-flags@v1.4.0/parser.go:186
main.main()
	/Users/pumpkinyang/go/pkg/mod/github.com/go-swagger/go-swagger@v0.20.1/cmd/swagger/swagger.go:145 +0xc2c
make: *** [verify_swagger] Error 2

Possible Solution

Upgrade go-swagger from v0.20.1 to v0.21.0 as follow link described:
go-swagger/go-swagger#2063

Steps to Reproduce (for bugs)

  1. go version go1.13.4 darwin/amd64
  2. master branch
@zhouzhuojie
Copy link
Collaborator

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants