Skip to content

[Java][Spring] Fix spring cloud client due to enhancement in adding server example responses. #5497

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

Merged
merged 4 commits into from
Apr 27, 2017

Conversation

wing328
Copy link
Contributor

@wing328 wing328 commented Apr 27, 2017

PR checklist

  • Read the contribution guidelines.
  • Ran the shell/batch 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)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

To fix #5432

@wing328 wing328 changed the title [Spring] Fix spring cloud client due to enhancement in adding server example responses. [Java][Spring] Fix spring cloud client due to enhancement in adding server example responses. Apr 27, 2017
@wing328 wing328 added this to the v2.2.3 milestone Apr 27, 2017
@cbornet
Copy link
Contributor

cbornet commented Apr 27, 2017

Wouldn't it be easier to have some "returnExamples" additionalProperty that is false for spring-cloud and that equals "examples" for the other ?
That way, we wouldn't have duplication in the template.

@wing328
Copy link
Contributor Author

wing328 commented Apr 27, 2017

@cbornet thanks for the suggestion. I think the challenge lies in the fact that both client and server share the same templates and I believe we still need the useSpringCloudClient tag to avoid unnecessary Java library import.

Anyway feel free to submit a PR to further enhance the template after this PR is merged into master.

@wing328 wing328 merged commit 42a5a13 into master Apr 27, 2017
@wing328 wing328 deleted the fix_spring_cloud_client branch April 27, 2017 12:01
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
…erver example responses. (swagger-api#5497)

* add use spring cloud client option

* uncomment spring cloud client test

* remove scala-related tests from pom.xml for circleci

* fix mismstach tag
@@ -17,8 +17,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
{{^useSpringCloudClient}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Spring cloud client doesn't generate the apiController so I guess this is not needed...

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

Successfully merging this pull request may close these issues.

[Java] Spring Cloud Client is broken due to template change
2 participants