Skip to content

Commit

Permalink
Fix: Required DateTime QueryParameter in round-trip format (#245)
Browse files Browse the repository at this point in the history
* fix: DateTime and DateTimeOffset as query parameters with round-trip format

* updated release notes
  • Loading branch information
MichaelMay81 authored Jun 3, 2024
1 parent fd0b03f commit 09b99af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### 2.1.2 - Jun 3, 2024

- fix: Support DateTime/DateTimeOffset as required query parameter, using round-trip format (#244)

#### 2.1.1 - Apr 8, 2024

- Minor dependency updates
Expand Down
2 changes: 2 additions & 0 deletions src/SwaggerProvider.Runtime/RuntimeHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ module RuntimeHelpers =
| :? Option<string> as x -> x |> toStrOpt name
| :? Option<DateTime> as x -> x |> toStrDateTimeOpt name
| :? Option<DateTimeOffset> as x -> x |> toStrDateTimeOffsetOpt name
| :? DateTime as x -> [ name, x.ToString("O") ]
| :? DateTimeOffset as x -> [ name, x.ToString("O") ]
| :? Option<Guid> as x -> x |> toStrOpt name
| _ -> [ name, (if isNull obj then null else obj.ToString()) ]

Expand Down

0 comments on commit 09b99af

Please sign in to comment.