You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the kittycad.rs test test_stream is failing. Why? Because it's trying to deserialize ApiCallWithPrice, but it finds an empty string when it tries to deserialize an IP address.
Test failure
---- tests::test_stream stdout ----
thread 'tests::test_stream' panicked at 'Serde Error:
1 | ...T07:00:23.846Z","ip_address":"","status_code":500,"method":"G...
| ^ invalid IP address syntax at line 1 column 8482785
', kittycad/src/tests.rs:112:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
/// The ip address of the origin.#[serde(default)]pub ip_address:crate::db::ipaddr::IpAddr,
Note that crate::db::ipaddr::IpAddr is a newtype around Option<std::net::IpAddr>, so kittycad.rs should know it can always be None and should deserialize the empty string into None.
This will require tweaking the Rust that openapitor outputs for openAPI fields like this, so, let's examine the OpenAPI spec for that field. It is:
"ip_address": {
"default": "",
"description": "The ip address of the origin.",
"format": "ip",
"title": "String",
"type": "string"
},
The text was updated successfully, but these errors were encountered:
Currently the kittycad.rs test
test_stream
is failing. Why? Because it's trying to deserializeApiCallWithPrice
, but it finds an empty string when it tries to deserialize an IP address.Test failure
The relevant field is defined in kittycad.rs:
and comes from this definition in api-deux
Note that
crate::db::ipaddr::IpAddr
is a newtype aroundOption<std::net::IpAddr>
, so kittycad.rs should know it can always beNone
and should deserialize the empty string intoNone
.This will require tweaking the Rust that openapitor outputs for openAPI fields like this, so, let's examine the OpenAPI spec for that field. It is:
The text was updated successfully, but these errors were encountered: