Use [JsonStringEnumMemberName] instead of [EnumMember]#1864
Merged
lahma merged 1 commit intoRicoSuter:masterfrom Sep 28, 2025
Merged
Use [JsonStringEnumMemberName] instead of [EnumMember]#1864lahma merged 1 commit intoRicoSuter:masterfrom
lahma merged 1 commit intoRicoSuter:masterfrom
Conversation
System.Text.Json ignores the `System.Runtime.Serialization.EnumMember` attribute. It needs the [`System.Text.Json.Serialization.JsonStringEnumMemberName` attribute](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/customize-properties#custom-enum-member-names) to customize the names of individual enum members.
Contributor
Author
|
I should have seen it with the new verified files introduced in #1863 but I got fooled by the code compiling properly. Of course compiling doesn't mean working as expected! 😄 |
0xced
added a commit
to 0xced/refitter
that referenced
this pull request
Sep 29, 2025
Apply the equivalent of RicoSuter/NJsonSchema#1863 and RicoSuter/NJsonSchema#1864 while waiting for the next version of NJsonSchema.CodeGeneration.CSharp to be released.
0xced
added a commit
to 0xced/refitter
that referenced
this pull request
Sep 29, 2025
Apply the equivalent of RicoSuter/NJsonSchema#1863 and RicoSuter/NJsonSchema#1864 while waiting for the next version of NJsonSchema.CodeGeneration.CSharp to be released.
0xced
added a commit
to 0xced/refitter
that referenced
this pull request
Sep 29, 2025
Apply the equivalent of RicoSuter/NJsonSchema#1863 and RicoSuter/NJsonSchema#1864 while waiting for the next version of NJsonSchema.CodeGeneration.CSharp to be released.
0xced
added a commit
to 0xced/refitter
that referenced
this pull request
Sep 30, 2025
Apply the equivalent of RicoSuter/NJsonSchema#1863 and RicoSuter/NJsonSchema#1864 while waiting for the next version of NJsonSchema.CodeGeneration.CSharp to be released.
Collaborator
Owner
|
Both libraries have now been released as NuGet packages. |
Owner
We need to fix this ASAP, this is really bad... TBH i dont even understand what this new attribute is providing in additional value, you could already change name with the previous attriubute, or not?
|
This was referenced Oct 6, 2025
Merged
This was referenced Oct 17, 2025
This was referenced Oct 27, 2025
This was referenced Oct 29, 2025
This was referenced Nov 10, 2025
Merged
This was referenced Nov 24, 2025
This was referenced Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
System.Text.Json ignores the
System.Runtime.Serialization.EnumMemberattribute. It needs theSystem.Text.Json.Serialization.JsonStringEnumMemberNameattribute to customize the names of individual enum members.