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/java-msf4j-petstore-server.sh (once before the change (Update samples for MSF4J after 2.2.2. #4915) and once again after the change (with no effect)).
  • Filed the PR against the correct branch: master for non-breaking changes.

Description of the PR

(This includes the changes from #4915. Should look better after merging this, or look at just the last commit. I'm already opening the PR so CI can look at it.) → now rebased.

This is a part of the fixes for meta issue #4898.

This fixes a wrong parameter mapping for file upload form parameters, as well as non-file-upload form parameters with the x-multipart vendor extension, when the parameter names in the OpenAPI definition get transformed to different names (e.g. to confirm to camelCase, or to avoid reserved words).

I didn't succeed to actually test this, not having a MSF4J project here.
The petstore example has no file upload form parameter where this would make a difference.

Needs review from Java/MSF4J experts. /cc @cbornet @xhh @kolyjjj

@ePaul
Copy link
Contributor Author

ePaul commented Mar 4, 2017

Hmm, Travis seems to have problems with a network connection when installing NPM. :-/

@ePaul ePaul changed the title Fix 4898 for msf4j Fix #4898 for msf4j Mar 4, 2017
@ePaul ePaul force-pushed the fix-4898-for-msf4j branch from f2db33e to ac458b7 Compare March 4, 2017 16:23
@wing328
Copy link
Contributor

wing328 commented Mar 5, 2017

@ePaul thanks for the fix.

@sanjeewa-malalgoda (creator of MSF4J generator), would you please take a look when you've time?

@wing328 wing328 added this to the v2.2.3 milestone Mar 5, 2017
@ePaul ePaul force-pushed the fix-4898-for-msf4j branch from ac458b7 to a296fc8 Compare March 5, 2017 19:26
@ePaul
Copy link
Contributor Author

ePaul commented Mar 5, 2017

(Rebased onto master to get rid of the commit from #4919.)

@ePaul ePaul force-pushed the fix-4898-for-msf4j branch from a296fc8 to 2012047 Compare March 6, 2017 14:51
@ePaul ePaul changed the title Fix #4898 for msf4j Fix (partially) #4898 for msf4j Mar 6, 2017
@wing328 wing328 merged commit 0f88e4a into swagger-api:master Mar 7, 2017
@ePaul ePaul deleted the fix-4898-for-msf4j branch March 7, 2017 14:02
@wing328 wing328 changed the title Fix (partially) #4898 for msf4j [Java][MSF4J] 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