Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.36k stars 2k forks source link

Investigate Union Types vs BinaryData #42334

Open samvaity opened 1 month ago

samvaity commented 1 month ago

@JonathanGiles :

A quick exploration on better Union types in Java: https://github.com/JonathanGiles/JavaUnions

You can see samples here: https://github.com/JonathanGiles/JavaUnions/blob/main/src/main/java/net/jonathangiles/test/union/samples/Main.java https://github.com/JonathanGiles/JavaUnions/blob/main/src/main/java/net/jonathangiles/test/union/samples/ModelType.java https://github.com/JonathanGiles/JavaUnions/blob/main/src/main/java/net/jonathangiles/test/union/samples/GenericModelType.java

samvaity commented 4 weeks ago

Putting related content together: https://gist.github.com/alzimmermsft/896de806972bc21f3f7e01273ad8c282