Skip to content

Bump Microsoft.NET.Test.Sdk and NJsonSchema#44

Merged
SondreJDigdir merged 1 commit intomainfrom
dependabot/nuget/src/Dan.Plugin.Enova/nuget-version-minor-patch-1080ef7c81
Apr 22, 2026
Merged

Bump Microsoft.NET.Test.Sdk and NJsonSchema#44
SondreJDigdir merged 1 commit intomainfrom
dependabot/nuget/src/Dan.Plugin.Enova/nuget-version-minor-patch-1080ef7c81

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

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

Updated Microsoft.NET.Test.Sdk from 18.3.0 to 18.4.0.

Release notes

Sourced from Microsoft.NET.Test.Sdk's releases.

18.4.0

What's Changed

New Contributors

Full Changelog: microsoft/vstest@v18.3.0...v18.4.0

Commits viewable in compare view.

Updated NJsonSchema from 11.5.2 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

11.6.0

[!CAUTION]
Do not use this release — upgrade to v11.6.1 or later.

v11.6.0 introduced a regression in the handling of the C# required keyword and [JsonRequired]: required T? / [JsonRequired] T? properties incorrectly lost their nullability and gained a spurious MinLength=1 on strings. This broke downstream client generation — see NSwag#​5359. Fixed in v11.6.1 (#​1919).


Potentially breaking changes

  • C# 11 required keyword now recognized as required: Properties using the C# 11 required keyword (RequiredMemberAttribute / JsonRequiredAttribute) are now correctly treated as required in schema generation and code output. Previously these were incorrectly treated as optional (Required.Default). This changes generated code: such properties now get Required.Always, [Required] attribute, and the required modifier when UseRequiredKeyword is enabled. (#​1908)
  • Both JsonStringEnumMemberName and EnumMember attributes are now emitted for enum members when using System.Text.Json, for compatibility with NSwag's reflection-based URL parameter serialization. (#​1905)
  • $schema version preserved in ToJson() instead of forcing draft-04. If you relied on the output always being draft-04, this may affect you. (#​1881)
  • patternProperties validation now correctly applies to all matching properties, not just the first. (#​1898)
  • MinLength no longer incorrectly applied to DateTime, DateTimeOffset, DateOnly, TimeOnly properties. (#​1900)

What's Changed

New Contributors

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

Commits viewable in compare view.

@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Apr 21, 2026
@SondreJDigdir
Copy link
Copy Markdown
Contributor

@dependabot rebase

1 similar comment
@SondreJDigdir
Copy link
Copy Markdown
Contributor

@dependabot rebase

Bumps coverlet.collector from 8.0.0 to 8.0.1
Bumps Microsoft.NET.Test.Sdk from 18.3.0 to 18.4.0
Bumps NJsonSchema from 11.5.2 to 11.6.1

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: nuget-version-minor-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: nuget-version-minor-patch
- dependency-name: NJsonSchema
  dependency-version: 11.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: nuget-version-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot changed the title Bump the nuget-version-minor-patch group with 3 updates Bump Microsoft.NET.Test.Sdk and NJsonSchema Apr 22, 2026
@dependabot dependabot Bot force-pushed the dependabot/nuget/src/Dan.Plugin.Enova/nuget-version-minor-patch-1080ef7c81 branch from 86985da to 8d045df Compare April 22, 2026 06:48
@SondreJDigdir SondreJDigdir merged commit d93feb6 into main Apr 22, 2026
@dependabot dependabot Bot deleted the dependabot/nuget/src/Dan.Plugin.Enova/nuget-version-minor-patch-1080ef7c81 branch April 22, 2026 06:50
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