go-swaggerLite
go-swaggerLite copied to clipboard
Can not find definition of unnamed model.
When attempting to use go-swaggerLite, I eventually come up against this 'cannot find definition' error message. It appears to be an anonymous struct literal. I can't seem to find anything in my code that has this kind of signature. Has anyone run into this before?
jackman@z420:~$ go-swaggerLite -apiPackage="foo/bar" -mainApiFile="foo/bar/main.go" -packageExclusionList="golang_org/x/net/lex/httplex,golang_org/x/net/http2/hpack,golang_org/x/net/route"
2016/09/21 15:54:29 Can not find definition of &{8122 0xc4200e3e60 false} model. Current package foo/bar
BTW, the 'support-vendor-dir' branch was very helpful to me, as you can see above.
It appears that I've narrowed down the scope of this problem.
Please see this project:
https://github.com/jackmanlabs/swagger-test
This project contains to very simple web APIs that demonstrate that the swagger tool fails to handle nested structs in response types. Is there a work-around for this?
Thank you.
@jackmanlabs how were you able to use the -packageExclusionList
flag? That flag doesn't exist for me.
flag provided but not defined: -packageExclusionList
Usage of ../../go-swaggerLite:
-apiPackage string
The package that implements the API controllers, relative to $GOPATH/src
-basePath string
Web service base path
-format string
Output format type for the generated files: go|markdown (default "go")
-mainApiFile string
The file that contains the general API annotations, relative to $GOPATH/src
-output string
The opitonal name of the output file to be generated (default "generatedSwaggerSpec.go")
-package string
The opitonal package name of the output file to be generated (default "main")
@jackic23 I used the 'support-vendor-dir' branch.