[Swift3] Fix parameter names using {{baseName}} #4916
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/swift3-petstore-all.sh (
once before the change, see Update swift3 samples after 2.2.2. #4911, once againafter the change.)Description of the PR
This includes the changes of #4911 – after merging those, it should be clearer what actually changed. (Or just have a look at the last two commits.)This fixes a wrong name-mapping of path parameters, as part of solving #4898.
It looks like there is no test case in petstore which actually makes a difference here.
It might be that there actually is no problem (i.e. if parameter names are never modified for Swift3, then
baseNameis the same asparamName, so it doesn't matter – though then there might be problems when hitting reserved words), or that it just is not happens with our petstore example.I need someone who knows about the swift clients to review this – cc @jaz-ah @Edubits.
(A side remark: Some ids in the generated samples look different each time the generator is run – see commit 8e847ab. This introduces unneeded noise when looking at the diffs. Might be worth looking into, in a separate issue/PR.)