Release 7.1.6#207
Merged
Merged
Conversation
… generation (Issue #203) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… docs, extract test file Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ent-level test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…omponent-level and custom RuleFilter tests Warning logging now happens inside the RuleFilter/RuleComponentFilter conditions created by FillDefaultValues. This ensures: - No spurious warnings when user sets a custom RuleFilter - No LINQ scan inside the 4-level nested loop in ApplyRulesToSchema Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Multiple .Matches() rules on one property were placed into separate allOf subschemas, which Swagger UI/Redoc/Scalar collapse — keeping only the first pattern and duplicating the property. Now multiple patterns are combined into a single 'pattern' via lookahead assertions, preserving .Matches() semantics (Regex.IsMatch — "contains a match") and rendering correctly in all tools. - Add PatternCombiner helper in MicroElements.OpenApi.FluentValidation - Apply in Swashbuckle, AspNetCore.OpenApi and NSwag rule providers (NSwag previously kept only the last pattern) - Change SchemaGenerationOptions.UseAllOfForMultipleRules default true -> false; set true to keep the legacy allOf representation - Add unit and integration tests Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- PatternCombiner.Combine: guard against null/empty newPattern - Document the accepted edge case in the LookaheadPrefix detection heuristic - Note in UseAllOfForMultipleRules XML doc that NSwag always combines patterns - Assert the combined pattern in the existing multiple_match_rules test Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tches-pattern Fix multiple .Matches() rules displayed incorrectly (Issue #204)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The 7.1.3 fix (SnapshotRefs + RestoreUnmodifiedRefs) restored unmodified $refs, but when a nested object's constraints come from ChildRules (or any inline child validator) the child type has no standalone validator, so its component schema is generated empty and gains its Required only AFTER the parent's inline snapshot is taken. The stale Required on the inline copy then diverged from the component and defeated HasValidationConstraintChanges, leaving an inline copy and an orphaned child component. Fix: make the Required comparison in HasValidationConstraintChanges directional — only block ref restoration when the inline copy carries a required entry the component lacks (the copy is authoritative for it). SetValidator (with a standalone child validator) was already correct; BigInteger/enum per-model constraints (Issues #146/#176) continue to work. Add regression tests for ChildRules-inline and multi-constraint SetValidator nested objects. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… tests
Per the PR review, both tests now also assert:
- Name gets maxLength=510 (not just Email format=email)
- the child component's Required contains {Email, Name} — the exact set the
orphan bug used to drop
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…inline-ref Fix $ref orphaned with ChildRules/inline child validator (Issue #198)
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.
Promote 7.1.6 to stable (from
release/v7.1.6-beta). Supersedes the unreleased 7.1.5 betas.Included
$refreplaced with an inline copy / orphaned child component when nested constraints come fromChildRulesor an inline child validator (#198, #206).ConditionalRulesModefor.When()/.Unless()rules (#203)..Matches()rules on one property rendered incorrectly; now combined into a singlepatternvia lookahead (#204, #205). Default ofUseAllOfForMultipleRuleschangedtrue→false.Tests green on net8.0/net9.0/net10.0. Merging to
masterpublishes7.1.6to NuGet.