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

OpenAPI 3 empty object responses generate invalid Go clients #86

Open
displague opened this issue Mar 24, 2018 · 0 comments
Open

OpenAPI 3 empty object responses generate invalid Go clients #86

displague opened this issue Mar 24, 2018 · 0 comments

Comments

@displague
Copy link

displague commented Mar 24, 2018

Empty object responses are causing gnostic to produce invalid go stanzas:

Given a schema response such as:

       responses:
         '200':
           description: Any endpoint that yields "{}"
           content:
             application/json:
                schema:
                 type: object

gnostic produces a client method whose result is:

result := &interface{}{}

I've also tried adding the implicit: properties: {}, but the generated client includes the same bug (expected ';', found '{').

More details can be found here, https://gist.github.com/displague/31700ba03009d1a183297949c54e7471 including the schema being used and the full client output.

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

1 participant