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 [DataMember] IsRequired in NewtonsoftDataContractResolver #2644

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on May 3, 2023

  1. ✅ Add non-regression tests for DataMember required

    As DataMember implementation comes after the implementation for [JsonProperty] and [JsonObject], we want to be sure that the current behavior is not bypassed.
    ouvreboite committed May 3, 2023
    Configuration menu
    Copy the full SHA
    810b4cc View commit details
    Browse the repository at this point in the history
  2. ✨Add support for [DataMember(IsRequired)]

    Add test cases for DataMember (IsRequired and Name).
    It seems that NewtonSoft's ResolveContract correctly set the Required, using [DataMember], [JsonProperpty] and [JsonRequired] so we can directly use it instead of the IsRequiredSpecifed extension method.
    ouvreboite committed May 3, 2023
    Configuration menu
    Copy the full SHA
    4c97c92 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a8e2841 View commit details
    Browse the repository at this point in the history