Skip to content

Conversation

@ePaul
Copy link
Contributor

@ePaul ePaul commented Mar 4, 2017

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change.
    → bin/spring-cloud-feign-petstore.sh
  • Filed the PR against the correct branch: master for non-breaking changes (???)

Description of the PR

(Note that this includes the changes from #4901 for updating the samples before doing any changes. After merging those (and potentially rebasing this) the diff will look better in the samples part. I'm opening the PR already now to let CI have a look at it.)

This is a part of a series of fixes for #4898.
I think it fixes the wrong name translations for non-file-upload form parameters in spring-cloud library variants of spring language, when the original parameter name doesn't fit the naming conventions (e.g. camelCase) or conflicts with a reserved word. For file upload parameters, previously only the name file was accepted (now every name), but then translated to the baseName (instead of paramName).

The petstore example doesn't seem to have any occurrence where this actually makes any difference in the generated code. Or it could be that formParams.mustache is not used at all?

This needs Review + Tests by Java/Spring-Cloud/Feign experts. /cc @cbornet

@ePaul ePaul force-pushed the fix-4898-for-spring-cloud branch from afccff4 to 2a724fb Compare March 5, 2017 19:38
@ePaul
Copy link
Contributor Author

ePaul commented Mar 5, 2017

Rebased onto master after #4901 was merged.

@wing328 wing328 added this to the v2.2.3 milestone Mar 6, 2017
@wing328 wing328 merged commit e477ac9 into swagger-api:master Mar 6, 2017
@wing328
Copy link
Contributor

wing328 commented Mar 6, 2017

@ePaul thanks for the fix, which looks good to me.

@ePaul ePaul deleted the fix-4898-for-spring-cloud branch March 6, 2017 09:08
@wing328 wing328 changed the title Fix #4898 for spring cloud [SpringCloud] Fix parameter names with {{baseName}} Mar 12, 2017
spr3nk3ls pushed a commit to spr3nk3ls/swagger-codegen that referenced this pull request Mar 28, 2017
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.

2 participants