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

Support configuring whether to generate StringEnumConverter #1646

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Nov 8, 2023

STJ has problems with JsonStringEnumConverter when values come from EnumMemberAttribute. This can be bypassed by configuring serializer setting, but property setting win over them so there needs to be a switch to disable this generation. Defaults to true to work like before.

@lahma lahma requested a review from RicoSuter November 8, 2023 09:26
@RicoSuter
Copy link
Owner

RicoSuter commented Nov 28, 2023

The client/DTO code should be self-contained and I do not see why this is a problem?

@lahma
Copy link
Collaborator Author

lahma commented Nov 28, 2023

The problem was that if there's attribute present, I cannot configure it more globally on serializer level. If there's attribute on property - it will win. So if I configure serializer to output X it won't happen when there's NJsonSchema generated property present that says it should be Y. The use case is to suppress the property generation and let the serializer use more global defaults.

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