-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
kind/enhancementNew feature or requestNew feature or requeststage/5-alpha-release-testingThe pull request is merged, an alpha release is available, to be testedThe pull request is merged, an alpha release is available, to be tested
Description
Is your feature request related to a problem? Please describe.
C# plugin has hardcoded behavior when dealing with JSON attributes. It always uses Newtonsoft.Json. This flow is unacceptable for such scenarios:
- Use plugin without generating JSON attributes.
- Use JSON attributes of another library (like standardized
System.Text.Json).
I would like to use this plugin and library in general to generate POCO classes for my GraphQL schema in the Schema-first HotChocolate project, but I am not using Newtonsoft.Json and don't want to embed it in my project for fixing such a case.
Describe the solution you'd like
Add 2 additional options for configuration:
emitJsonAttributes: boolean(default:true, to keep compatibility)jsonAttributesSource: 'Newtonsoft.Json' | 'System.Text.Json'| ... (default:'Newtonsoft.Json'to keep compatibility)
The second option will be ignored when the first one is undefined or false.
I already have a solution in my fork, will create PR for that.
dotansimha
Metadata
Metadata
Assignees
Labels
kind/enhancementNew feature or requestNew feature or requeststage/5-alpha-release-testingThe pull request is merged, an alpha release is available, to be testedThe pull request is merged, an alpha release is available, to be tested