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

Fix for uncompilable java client if no model definitions is specified … #8123

Merged
merged 1 commit into from
May 25, 2018

Conversation

eivinhb
Copy link
Contributor

@eivinhb eivinhb commented May 2, 2018

…(#7836)

After fixes for #6636 the gson based clients would not compile if the
swagger json did not have any model definitions. This can be the case
if the API only uses simple datastructures for input and output. (int,
String, List, Map etc.)

I have not updated the pet-store-clients for this PR. The reason is that the change does not affect the pet store api in any way, since this is fix is for apis with no model definitions.

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

…wagger-api#7836)

After fixes for swagger-api#6636 the gson based clients would not compile if the
swagger json did not have any model definitions. This can be the case
if the API only uses simple datastructures for input and output. (int,
String, List, Map etc.)
@eivinhb
Copy link
Contributor Author

eivinhb commented May 2, 2018

@jeff9finger for review.

@eivinhb eivinhb changed the title Fix for uncompilable java client if no model definitions i specified … Fix for uncompilable java client if no model definitions is specified … May 2, 2018
@eivinhb
Copy link
Contributor Author

eivinhb commented May 2, 2018

To test:
If you take the content of this file and drop it into http://editor.swagger.io and generate a java-client. The client you receive will not compile. This will work after the applied fixes above.
swagger.txt

Copy link
Contributor

@jeff9finger jeff9finger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@eivinhb
Copy link
Contributor Author

eivinhb commented May 22, 2018

@jeff9finger What does it take to get this merged now? Is there anything I can do?

@jeff9finger
Copy link
Contributor

It is up to someone who has authority to merge it.

@HugoMario
Copy link
Contributor

thanks a lot @eivinhb !

@HugoMario HugoMario merged commit 9e08dd5 into swagger-api:master May 25, 2018
frantuma added a commit that referenced this pull request Nov 8, 2018
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 this pull request may close these issues.

3 participants