Upgrade to NJsonSchema v11.6.1 (NSwag v14.7.1)#5367
Merged
Conversation
… dependencies of Nuke.Common to patched versions.
…llow null values for specific attributes
This was referenced Apr 20, 2026
Closed
Closed
Closed
Closed
This was referenced Apr 23, 2026
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Upgrades NJsonSchema to v11.6.1, which corrects the regression introduced in v11.6.0 around the C#
requiredkeyword and[JsonRequired]handling.What this fixes downstream
Closes #5359:
required T?/[JsonRequired] T?DTO properties incorrectly lost their nullability and gained a spuriousMinLength=1on strings, causing generated TypeScript and C# clients to drop null-safety for fields the server can legitimately return as null.For
public required string[]? OptionList { get; init; }:optionList: string[]public string[] OptionListoptionList: string[] | nullpublic string[]? OptionListSemantics
NJsonSchema v11.6.1 treats the C#
requiredkeyword and[JsonRequired]as presence markers only — they add the property to the schema'srequiredarray without suppressing nullability or addingMinLength=1. Only DataAnnotations[Required]carries the "non-null value" semantic.See NJsonSchema#1919 for the full discussion, truth tables, and Swagger 2.0 / OpenAPI 3.x behavior.
Note
v14.7.0 should be skipped — users should upgrade directly from v14.6.3 to v14.7.1.
Also closes #5358