Skip to content

Support UUID types in scala-akka-client#9215

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
cornerman:uuid-parameter
Apr 11, 2021
Merged

Support UUID types in scala-akka-client#9215
wing328 merged 1 commit intoOpenAPITools:masterfrom
cornerman:uuid-parameter

Conversation

@cornerman
Copy link
Copy Markdown
Contributor

Add support for the java.util.UUID type in parameter serialization and response deserialization.

This additionally adds support for java.net.URI, java.net.URL for response deserialization.

The UUID types are already generated, when using a schema using uuid formatted strings in the openapi schema.

@cchafer

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master, 5.1.x, 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@cchafer
Copy link
Copy Markdown
Contributor

cchafer commented Apr 8, 2021

This addition makes sense.
Just a little comment about UUIDs : due to endianness, not all languages handle UUID the same way.

As an example, a java.util.UUID rendered with the .toString method, transmitted over the network, and then deserialized through the System.Guid constructor in .Net won't be the same.
I don't have any solution to that problem, and I'm not sure wether or not the openapi spec defines the uuid format.
But you may want to have a look at it.

@wing328
Copy link
Copy Markdown
Member

wing328 commented Apr 9, 2021

cc @clasnake (2017/07), @jimschubert (2017/09) ❤️, @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04)

@cornerman
Copy link
Copy Markdown
Contributor Author

Just a little comment about UUIDs : due to endianness, not all languages handle UUID the same way.

That is a good point that I have not thought about. Not sure, what we can do about it. I sadly did not find anything regarding the openapi spec.

@wing328
Copy link
Copy Markdown
Member

wing328 commented Apr 11, 2021

Tested locally and the output compiles.

@wing328 wing328 merged commit 63fdd3e into OpenAPITools:master Apr 11, 2021
@wing328 wing328 added this to the 5.1.1 milestone Apr 11, 2021
@cornerman cornerman deleted the uuid-parameter branch April 13, 2021 11:26
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