-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Option
no longer has a default of null as of v0.8.18
#295
Comments
GREsau
added a commit
that referenced
this issue
May 23, 2024
GREsau
added a commit
that referenced
this issue
May 23, 2024
Nope this wasn't intentional, thanks for reporting it! It should now be fixed in 0.8.21 |
Thanks for the quick fix! |
Geal
added a commit
to apollographql/router
that referenced
this issue
May 24, 2024
the generated schema changed due to a fix in schemars: GREsau/schemars#295
dani-garcia
referenced
this issue
in bitwarden/sdk-sm
May 31, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [schemars](https://graham.cool/schemars/) ([source](https://github.com/GREsau/schemars)) | dependencies | patch | `0.8.19` -> `0.8.21` | --- ### Release Notes <details> <summary>GREsau/schemars (schemars)</summary> ### [`v0.8.21`](https://github.com/GREsau/schemars/blob/HEAD/CHANGELOG.md#0821---2024-05-23) [Compare Source](https://github.com/GREsau/schemars/compare/v0.8.20...v0.8.21) ##### Fixed: - Fix `null` default not being set on generated schemas ([https://github.com/GREsau/schemars/issues/295](https://github.com/GREsau/schemars/issues/295) / [https://github.com/GREsau/schemars/pull/296](https://github.com/GREsau/schemars/pull/296)) ### [`v0.8.20`](https://github.com/GREsau/schemars/blob/HEAD/CHANGELOG.md#0820---2024-05-18) [Compare Source](https://github.com/GREsau/schemars/compare/v0.8.19...v0.8.20) ##### Fixed: - Revert unintentional change in behaviour when combining `default` and `required` attributes ([https://github.com/GREsau/schemars/issues/292](https://github.com/GREsau/schemars/issues/292)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every 2nd week starting on the 2 week of the year before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/bitwarden/sdk). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
In schemars v0.8.17, an
Option
with a default ofNone
results in"default": null
.In schemars v0.8.18 (and the latest v0.8.20), the same
Option
has no default.I'm not sure if this was an intentional change, but it seems to me like having
"default": null
would be more expected, especially given that the example used the#[schemars(default = "Self::default")]
attribute.The text was updated successfully, but these errors were encountered: