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

Add .NET 9's JsonStringEnumMemberNameAttribute #833

Merged
merged 11 commits into from
Jan 24, 2025
Merged

Conversation

wasabii
Copy link
Contributor

@wasabii wasabii commented Jan 4, 2025

Adds support for deriving the proper possible values for enum members J decorated with JsonStringEnumMemberNameAttribute. Specifically, I need this to support lowercase values in the CRDs, but PascalCase in .NET.

@buehler buehler enabled auto-merge (squash) January 6, 2025 14:08
@buehler
Copy link
Owner

buehler commented Jan 6, 2025

Hey @wasabii

Thanks for contributing!

To correctly check the preview stuff, you will need to annotate all functions that use preview functions with the required attribute (can be seen in the conversion webhook).

As such, people that use the SDK need to actively opt in into these features. The reason is that they might change.

So, currently the linter is not so happy ;)

@wasabii
Copy link
Contributor Author

wasabii commented Jan 6, 2025

Okay. I couldn't figure out what was going on. I could not build the main branch on a fresh checkout. So I kinda assumed you were doing something by hand....

@wasabii wasabii changed the title Add EnumMemberAttribute and .NET 9's JsonStringEnumMemberNameAttribute Add .NET 9's JsonStringEnumMemberNameAttribute Jan 6, 2025
@wasabii
Copy link
Contributor Author

wasabii commented Jan 6, 2025

In fact...... I didn't enable the preview features in this branch. If you go over the changes, I haven't done anything to the preview stuff. So this is how it builds main out of the box today....

@buehler
Copy link
Owner

buehler commented Jan 6, 2025

There seems to be an issue with the build of .net 9

@buehler buehler merged commit c9beb6d into buehler:main Jan 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants