Qovery/scaleway-api-rs

add `lb` open API specs

Aperta

#3 aperta il 1 lug 2021

 (1 commento) (0 reazioni) (0 assegnatari)Rust (0 fork)auto 404
good first issuehelp wanted

Metriche repository

Star
 (10 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Seems lb API specs make openapi generator produce code which leads to rust compilation error.

https://developers.scaleway.com/static/88c7c88370da8e5a3316e5831e230183/scaleway.lb.v1.Api.yml

   Compiling scaleway_api_rs v0.1.0 (/Users/user/Code/scaleway-api-rs)
error[E0428]: the name `ips_api` is defined multiple times
  --> src/apis/mod.rs:78:1
   |
77 | pub mod ips_api;
   | ---------------- previous definition of the module `ips_api` here
78 | pub mod ips_api;
   | ^^^^^^^^^^^^^^^^ `ips_api` redefined here
   |
   = note: `ips_api` must be defined only once in the type namespace of this module

error[E0599]: the method `to_string` exists for enum `std::option::Option<&str>`, but its trait bounds were not satisfied
   --> src/apis/alert_subscribers_api.rs:237:74
    |
237 |     local_var_req_builder = local_var_req_builder.query(&[("name", &name.to_string())]);
    |                                                                          ^^^^^^^^^ method cannot be called on `std::option::Option<&str>` due to unsatisfied trait bounds
    |
   ::: /Users/user/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:161:1
    |
161 | pub enum Option<T> {
    | ------------------
    | |
    | doesn't satisfy `std::option::Option<&str>: ToString`
    | doesn't satisfy `std::option::Option<&str>: std::fmt::Display`
    |
    = note: the following trait bounds were not satisfied:
            `std::option::Option<&str>: std::fmt::Display`
            which is required by `std::option::Option<&str>: ToString`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0428, E0599.
For more information about an error, try `rustc --explain E0428`.
error: could not compile `scaleway_api_rs`

To learn more, run the command again with --verbose.

Guida contributor