Bump NJsonSchema.Annotations from 11.4.0 to 11.6.1#1754
Closed
dependabot[bot] wants to merge 1 commit into
Closed
Conversation
Contributor
|
/lgtm |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, dependabot[bot] The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
--- updated-dependencies: - dependency-name: NJsonSchema.Annotations dependency-version: 11.6.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Contributor
Author
|
Looks like NJsonSchema.Annotations is no longer updatable, so this is no longer needed. |
8dc96f1 to
adb07d4
Compare
Contributor
|
New changes are detected. LGTM label has been removed. |
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.
Updated NJsonSchema.Annotations from 11.4.0 to 11.6.1.
Release notes
Sourced from NJsonSchema.Annotations's releases.
11.6.1
Corrections to v11.6.0
v11.6.0 added support for the C# 11
requiredkeyword and[JsonRequired]in schema generation (#1908), but folded them into the same bucket as DataAnnotations[Required]— which conflated three distinct concepts:requiredarray):requiredkeyword,[JsonRequired],[Required],[DataMember(IsRequired=true)], NewtonsoftRequired.Always/AllowNull[Required]only (plus NewtonsoftRequired.Always/DisallowNullfor runtime correctness)MinLength=1on strings):[Required]only (unlessAllowEmptyStrings=true)v11.6.1 (#1919) restores the correct separation. The
requiredkeyword and[JsonRequired]are now presence-only markers — they add the property to the schema'srequiredarray without suppressing nullability or addingMinLength=1.Behavioral deltas vs v11.6.0 (all restoring correctness)
required string?nullable: false,MinLength: 1❌nullable: true, noMinLength✅required stringMinLength: 1❌MinLength✅[JsonRequired] string?nullable: false,MinLength: 1❌nullable: true, noMinLength✅[JsonRequired] stringMinLength: 1❌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
Potentially breaking changes
requiredkeyword now recognized as required: Properties using the C# 11requiredkeyword (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 getRequired.Always,[Required]attribute, and therequiredmodifier whenUseRequiredKeywordis enabled. (#1908)JsonStringEnumMemberNameandEnumMemberattributes are now emitted for enum members when using System.Text.Json, for compatibility with NSwag's reflection-based URL parameter serialization. (#1905)$schemaversion preserved inToJson()instead of forcing draft-04. If you relied on the output always being draft-04, this may affect you. (#1881)patternPropertiesvalidation now correctly applies to all matching properties, not just the first. (#1898)DateTime,DateTimeOffset,DateOnly,TimeOnlyproperties. (#1900)What's Changed
+in JSON reference paths being decoded as space by @Copilot in Fix+in JSON reference paths being decoded as space RicoSuter/NJsonSchema#1880-1generating invalid C# identifier instead ofMinus1by @Copilot in Fix property named-1generating invalid C# identifier instead ofMinus1RicoSuter/NJsonSchema#1882New Contributors
+in JSON reference paths being decoded as space RicoSuter/NJsonSchema#1880Full Changelog: RicoSuter/NJsonSchema@v11.5.2...v11.6.0
11.5.2
What's Changed
JsonStringEnumConverter<T>detection and test it by @wellWINeo in Add support forJsonStringEnumConverter<T>detection and test it RicoSuter/NJsonSchema#1868New Contributors
JsonStringEnumConverter<T>detection and test it RicoSuter/NJsonSchema#1868Full Changelog: RicoSuter/NJsonSchema@v11.5.1...v11.5.2
11.5.1
What's Changed
New Contributors
Full Changelog: RicoSuter/NJsonSchema@v11.5.0...v11.5.1
11.5.0
What's Changed
Breaking changes:
Others:
Full Changelog: RicoSuter/NJsonSchema@v11.4.0...v11.5.0
Commits viewable in compare view.