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/jaxrs-*.sh
  • [?] Filed the PR against the correct branch: master for non-breaking changes. (???)

Description of the PR


This is a part of a series of fixes for #4898.
It fixes the wrong name translations for all kinds of form parameters in `jaxrs` and all its library variants, when the original parameter name doesn't fit the naming conventions (e.g. camelCase) or conflicts with a reserved word.

For plain JaxRS, only file upload form parameters and form parameters with a `x-multipart` vendor extension were affected. For most library variants, all kinds of form parameters were affected.

Generating the samples again shows quite some differences (mainly for reserved word conflicts). I didn't really got to test the changes yet, but the new ones look better to my eye. I'm not sure if the petstore samples cover every case this changes, though.

While this is a bug-fix, I'm not sure whether it qualifies as *non-breaking change*. One could say that those clients/servers previously didn't adhere to their swagger definition, and now they do. But if we use a broken client and a broken server together, it would still have "worked", and won't work when upgrading just one of them.

This needs review (and potentially tests) by Java/JaxRS experts. /cc @cbornet @xhh @kolyjjj 

@ePaul ePaul changed the title Fix 4898 for jaxrs Fix #4898 for jaxrs Mar 4, 2017
@ePaul ePaul force-pushed the fix-4898-for-jaxrs branch from eef34d6 to d108e34 Compare March 5, 2017 19:33
@ePaul
Copy link
Contributor Author

ePaul commented Mar 5, 2017

Rebased onto master after #4901 was merged.

@wing328
Copy link
Contributor

wing328 commented Mar 6, 2017

The change looks good to me 👍

@wing328 wing328 merged commit a710149 into swagger-api:master Mar 6, 2017
@wing328 wing328 added this to the v2.2.3 milestone Mar 6, 2017
@ePaul ePaul deleted the fix-4898-for-jaxrs branch March 6, 2017 14:42
@wing328 wing328 changed the title Fix #4898 for jaxrs [JAX-RS] Fix parameter names using {{baseName}} Mar 12, 2017
spr3nk3ls pushed a commit to spr3nk3ls/swagger-codegen that referenced this pull request Mar 28, 2017
* fix swagger-api#4898 for JavaJaxRS (including all libraries).

* Updated samples for jaxrs (after fix for swagger-api#4898).
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