-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Client] Inconsistent Default
vs skip_serializing_none
usage for status pages
#45
Comments
Hi
I've added a Default implementation for all of the models now. Since there is no formal definition of the models in Uptime Kuma I went with Option and
See my reasoning above for the decision to use Option. I've also added a small workaround for setting urls as icons, so this should work now. |
thanks 😍 🎉 |
Hi, I just tried to use the client and I came across a bit of a weird API-decision.
I wanted to ask if the partial usage of
skip_serializing_none
and the partial usage ofDefault
is intentional and If you'd like a PR for this (in either direction)here
Default
is not implementedAutoKuma/kuma-client/src/models/status_page.rs
Lines 62 to 66 in 8e16d11
vs here
Default
is implementedAutoKuma/kuma-client/src/models/monitor.rs
Lines 144 to 148 in 8e16d11
The result is that the handy
..Default::default()
shorthand does not work for all models.PS:
during trying the stus page I came acros this design decision:
AutoKuma/kuma-client/src/models/status_page.rs
Line 81 in 8e16d11
=> this should be
icon: String
with adata:..
-url. there is a patch for this in an upcoming release where we are going to accept urls there, but currently onlydata:
The text was updated successfully, but these errors were encountered: