Skip to content

Bump NJsonSchema from 11.6.0 to 11.6.1#271

Merged
mortenn merged 1 commit intomainfrom
dependabot/nuget/tools/NJsonSchema-11.6.1
Apr 29, 2026
Merged

Bump NJsonSchema from 11.6.0 to 11.6.1#271
mortenn merged 1 commit intomainfrom
dependabot/nuget/tools/NJsonSchema-11.6.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 29, 2026

Updated NJsonSchema from 11.6.0 to 11.6.1.

Release notes

Sourced from NJsonSchema's releases.

11.6.1

[!IMPORTANT]
v11.6.0 should not be used — it introduced a regression that caused required T? / [JsonRequired] T? properties to incorrectly lose their nullability and gain a spurious MinLength=1 on strings. Please upgrade directly from v11.5.x to v11.6.1.

Corrections to v11.6.0

v11.6.0 added support for the C# 11 required keyword and [JsonRequired] in schema generation (#​1908), but folded them into the same bucket as DataAnnotations [Required] — which conflated three distinct concepts:

  • Presence (belongs in schema's required array): required keyword, [JsonRequired], [Required], [DataMember(IsRequired=true)], Newtonsoft Required.Always/AllowNull
  • Non-null value (suppresses nullable): [Required] only (plus Newtonsoft Required.Always/DisallowNull for runtime correctness)
  • Non-empty string (MinLength=1 on strings): [Required] only (unless AllowEmptyStrings=true)

v11.6.1 (#​1919) restores the correct separation. The required keyword and [JsonRequired] are now presence-only markers — they add the property to the schema's required array without suppressing nullability or adding MinLength=1.

Behavioral deltas vs v11.6.0 (all restoring correctness)

C# declaration v11.6.0 (broken) v11.6.1
required string? nullable: false, MinLength: 1 nullable: true, no MinLength
required string MinLength: 1 no MinLength
[JsonRequired] string? nullable: false, MinLength: 1 nullable: true, no MinLength
[JsonRequired] string MinLength: 1 no MinLength

[Required], [JsonProperty(Required=*)], and [DataMember(IsRequired=true)] semantics are unchanged across v11.5.x / v11.6.0 / v11.6.1.

Downstream impact

The v11.6.0 regression surfaced in NSwag as NSwag#​5359: TypeScript clients generated from required T? DTO properties silently lost their | null, removing null-safety for fields the server can legitimately return as null. v11.6.1 fixes this. A matching NSwag release is required to pick up the fix.

What's Changed

New Contributors

Full Changelog: RicoSuter/NJsonSchema@v11.6.0...v11.6.1

Commits viewable in compare view.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: NJsonSchema
  dependency-version: 11.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Apr 29, 2026
@dependabot dependabot Bot requested a review from mortenn as a code owner April 29, 2026 17:21
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code labels Apr 29, 2026
@github-actions
Copy link
Copy Markdown

PR Validation

Check Result
CSharpier success
XamlStyler success
dotnet test success

CSharpier

Output
Checked 59 files in 939ms.

XamlStyler

Output
Checking: src\BrowserPicker.UI\App.xaml
  PASS
Checking: src\BrowserPicker.UI\Resources\ResourceDictionary.xaml
  PASS
Checking: src\BrowserPicker.UI\Views\BrowserEditor.xaml
  PASS
Checking: src\BrowserPicker.UI\Views\BrowserList.xaml
  PASS
Checking: src\BrowserPicker.UI\Views\Configuration.xaml
  PASS
Checking: src\BrowserPicker.UI\Views\ExceptionReport.xaml
  PASS
Checking: src\BrowserPicker.UI\Views\LoadingWindow.xaml
  PASS
Checking: src\BrowserPicker.UI\Views\MainWindow.xaml
  PASS
Checking: src\BrowserPicker.UI\Views\UrlEditor.xaml
  PASS

9 of 9 files pass format check.

dotnet test

Output
  Determining projects to restore...
  Restored D:\a\BrowserPicker\BrowserPicker\src\BrowserPicker.Windows\BrowserPicker.Windows.csproj (in 11.22 sec).
  Restored D:\a\BrowserPicker\BrowserPicker\src\BrowserPicker.UI\BrowserPicker.UI.csproj (in 11.22 sec).
  Restored D:\a\BrowserPicker\BrowserPicker\src\BrowserPicker.Common\BrowserPicker.Common.csproj (in 11.22 sec).

Run: PR Validation #13

@mortenn mortenn merged commit ddf3aa6 into main Apr 29, 2026
1 check passed
@dependabot dependabot Bot deleted the dependabot/nuget/tools/NJsonSchema-11.6.1 branch April 29, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant