Add DefaultValueHandling to JsonSerializerSettings #306
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.
Description
When the default JsonSerializerSettings are set to DefaultValueHandling = DefaultValueHandling.Ignore, certes is unable to generate SSL certificates. The error message is: "NewOrder request included invalid non-DNS type identifier: type "", value "DomainName"". The best workarounds I could think of to make certes work in a solution that needs to keep the DefaultValueHandling.Ignore as the default were both lengthly and ugly. However, preventing this from becoming an issue in the first place is a one-line fix.
New Test
I also started writing a unit test to verify that Certes continues to work despite the default JSON settings, but am not familiar enough with how the tests work in your solution to make much progress. Here is what I had previously if you are interested and willing to add it to the solution: