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

Response $ref type != struct #54

Open
llonchj opened this issue Nov 25, 2018 · 1 comment
Open

Response $ref type != struct #54

llonchj opened this issue Nov 25, 2018 · 1 comment

Comments

@llonchj
Copy link

llonchj commented Nov 25, 2018

/*
GET /v1/test
tests

Response 200: $ref: bool
*/

throws could not parse response 200 params: GetReference: could not find type "bool" in package ...

then tried:

type TestResponse bool

/*
GET /v1/test
tests

Response 200: $ref: TestResponse
*/

and throws: could not parse response 200 params: GetReference: TestResponse is not a struct or interface but a *ast.Ident

@arp242
Copy link
Contributor

arp242 commented Nov 25, 2018

Yeah, only structs are supported at the moment. It assumes the response is a JS/JSON object ({..}).

Why? Because that's what all our APIs return :-)

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

No branches or pull requests

2 participants