Skip to content

Fix backwards date comparison - #101

Open
Jerry-Johnson-3 wants to merge 1 commit into
criteo:mainfrom
Jerry-Johnson-3:codex/fix-date-comparison
Open

Jerry-Johnson-3 wants to merge 1 commit into
criteo:mainfrom
Jerry-Johnson-3:codex/fix-date-comparison

Conversation

@Jerry-Johnson-3

@Jerry-Johnson-3 Jerry-Johnson-3 commented Aug 24, 2026

Copy link
Copy Markdown

Summary

  • Fix the inverted DateTime comparison.
  • Add regression tests for equal and different OpenAPI dates.

Spec

OpenAPI 3.0 date values are RFC 3339 full-dates, and Schema default is a value of that type. Two equal dates are the same default; DifferFrom must return false for them, matching the other primitive overloads.

Testing

  • dotnet test — 98 passed on .NET 6 and .NET 8.

Date defaults were reported as changed when equal and ignored when different because the DateTime difference predicate returned equality directly. Add regression tests for both cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant