AutoKuma
AutoKuma copied to clipboard
[Client] Inconsistent `Default` vs `skip_serializing_none` usage for status pages
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 of Default
is intentional and If you'd like a PR for this (in either direction)
here Default
is not implemented
https://github.com/BigBoot/AutoKuma/blob/8e16d11bc72f7c13e8ea97a13b9b68e8d72cfc40/kuma-client/src/models/status_page.rs#L62-L66
vs here Default
is implemented
https://github.com/BigBoot/AutoKuma/blob/8e16d11bc72f7c13e8ea97a13b9b68e8d72cfc40/kuma-client/src/models/monitor.rs#L144-L148
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:
https://github.com/BigBoot/AutoKuma/blob/8e16d11bc72f7c13e8ea97a13b9b68e8d72cfc40/kuma-client/src/models/status_page.rs#L81
=> this should be icon: String
with a data:..
-url. there is a patch for this in an upcoming release where we are going to accept urls there, but currently only data: