Skip to content

Java: Fix UUID mapping to a UUID instead of a string#3732

Closed
brentryan wants to merge 4 commits into
swagger-api:masterfrom
cvent:cvent-fixes2
Closed

Java: Fix UUID mapping to a UUID instead of a string#3732
brentryan wants to merge 4 commits into
swagger-api:masterfrom
cvent:cvent-fixes2

Conversation

@brentryan

Copy link
Copy Markdown

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

It looks like there was a commit back in January that reverted a previous fix that added UUID types for java. The commit is 7aac639.

This fixes the issue by allowing UUID to be used in generated code.

@cbornet

cbornet commented Sep 6, 2016

Copy link
Copy Markdown
Contributor

The commit you mention didn't change the behavior regarding UUID : the line you want to remove was already there in JavaClientCodegen.

@cbornet

cbornet commented Sep 6, 2016

Copy link
Copy Markdown
Contributor

Acutally, the UUID mapping was added in #2754

@brentryan

Copy link
Copy Markdown
Author

@cbornet I don't see anything referencing UUID in JavaClientCodegen. I know that when I remove that line in AbstractJavaCodegen.java that it works fine now for me. Without removing that line it always maps to a string type.

@cbornet

cbornet commented Sep 6, 2016

Copy link
Copy Markdown
Contributor

I just mean that your reference to 7aac639 is wrong. It's #2754 that added the line.

@brentryan

Copy link
Copy Markdown
Author

Thank you.

@wing328 wing328 added this to the v2.2.2 milestone Sep 7, 2016
@wing328

wing328 commented Sep 7, 2016

Copy link
Copy Markdown
Contributor

@brentryan thanks for the PR. I did some tests and the result looks good. Please run the following to update Java API clients and server stubs so that the CIs can verify the change:

Java API clients

./bin/java-petstore-all.sh

Java server stubs:

jaxrs-resteasy-joda-petstore-server.sh  
jaxrs-jersey1-petstore-server.sh
jaxrs-resteasy-petstore-server.sh       
jaxrs-petstore-server.sh

@wing328

wing328 commented Sep 7, 2016

Copy link
Copy Markdown
Contributor

Also I think this is a breaking change as UUID will no longer be a string in Java API client and server stubs. Please resubmit the PR for 2.3.0 branch instead.

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.

3 participants