Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Discriminated union support #278

Open
1 task done
JamieMagee opened this issue Jun 1, 2023 · 1 comment
Open
1 task done

[FEAT]: Discriminated union support #278

JamieMagee opened this issue Jun 1, 2023 · 1 comment
Labels
Status: Needs info Full requirements are not yet known, so implementation should not be started Type: Feature New feature or request

Comments

@JamieMagee
Copy link
Contributor

Describe the need

There are quite a few types that are discriminated unions. See #178 for an example of one. Currently we sidestep the issue by deserializing to dynamic and letting the SDK consumer figure out what the actual type is.

Discriminated unions aren't likely to make it into C# in the near future1 (and I'm not likely to rewrite this SDK in F#). The only viable alternative I see right now is OneOf. However, the System.Text.Json story doesn't seem to be fully fleshed out.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Footnotes

  1. https://github.com/dotnet/csharplang/issues/113

@JamieMagee JamieMagee added Priority: Low Type: Feature New feature or request Status: Needs info Full requirements are not yet known, so implementation should not be started labels Jun 1, 2023
@JamieMagee
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs info Full requirements are not yet known, so implementation should not be started Type: Feature New feature or request
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants