[SpringCloud] Fix parameter names with {{baseName}} #4919
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change.→ bin/spring-cloud-feign-petstore.sh
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
springlanguage, 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 namefilewas accepted (now every name), but then translated to thebaseName(instead ofparamName).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