Qovery/scaleway-api-rs

add `lb` open API specs

開放

#3 建立於 2021年7月1日

 (1 則留言) (0 個反應) (0 位負責人)Rust (0 個分叉)auto 404
good first issuehelp wanted

倉庫指標

星標
 (10 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南