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.

贡献者指南