Repository navigation
[pull] master from OpenAPITools:master - #760
Merged
Merged
Conversation
* fix(dart): do not convert format: date fields to UTC before formatting
_dateFormatter is DateFormat('yyyy-MM-dd'), which formats the y/m/d the
DateTime already carries and performs no timezone conversion. Calling
toUtc() first therefore does nothing except roll the clock back past
midnight in UTC+X zones, so the formatter prints the previous day.
Combined with mapDateTime parsing the bare wire value "2026-09-12" as
local midnight, the round trip in Europe/Oslo is "2026-09-12" ->
"2026-09-11". It is stable in UTC, which is why this went unnoticed.
Removing toUtc() is safe in both directions: toUtc() returns this when
the DateTime is already UTC, so UTC callers are unaffected, and local
callers stop being shifted. The neighbouring isDateTime branch keeps
toUtc() - an instant needs a zone, a calendar date does not. dart-dio
already models this correctly with its own Date class.
fix #24703
* test(dart): cover all four format: date branches
The first test only exercised the plain, no-pattern branch, so three of the
four changed template lines were unguarded. Adding a patterned date to the
fixture plus a second test that generates with useOptional=true pins all
four:
plain / no pattern requiredDate, optionalDate
plain / pattern patternedDate
Optional / no pattern optionalDate (useOptional=true)
Optional / pattern patternedDate (useOptional=true)
Replace the blanket assertFileNotContains(".toUtc()") with assertions on the
specific emitted lines. The blanket one would break if an unrelated
date-time property were ever added to the shared fixture.
Also correct the comment: toUtc() shifts the date in both directions, back a
day east of UTC and forward a day west of it, not only backwards.
* Java/Spring handling of required+nullable in models * Java/Spring handling of required+nullable in models * Remove @NotNull under jspecify * merge master * merge master * new files generated * keep formatting, regenerate samples * regenerate samples * Keep @NotNull for JsonInclude field * Fix cubic findings * fix missing description * Fix failing removeAnnotationsWithExclusion * Fix cubic finding * Schema nullable=true generation Make JSonNullable<> field = null for nullable+required * Rollback: @NotNull should not be present for required+nullable + openapiNullable * Fix a NPE in add and put item * Add @present comment
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )