kotborealis / swagger-ui

Swagger-UI for rust applications
https://crates.io/crates/swagger-ui
20 stars 12 forks source link

Library seems deprecated #6

Open antondc opened 2 years ago

antondc commented 2 years ago

With last Rocket version, which doesn't support Rocket::ignite, error is returned when consuming the library:

#![feature(proc_macro_hygiene, decl_macro)]

extern crate rocket;

use rocket_swagger_ui;
use swagger_ui;

fn main() -> () {
  rocket::build()
    .mount(
      "/api/v1/swagger/",
      rocket_swagger_ui::routes(
        // Specify file with openapi specification,
        // relative to current file
        swagger_ui::swagger_spec_file!("../../swagger-ui/examples/openapi.json"),
        swagger_ui::Config { ..Default::default() },
      ),
    )
    .launch();
}
the trait bound `std::vec::Vec<Route>: From<std::vec::Vec<rocket::router::route::Route>>` is not satisfied

If library is not currently maintained please tag it as so or add a warning about the dependency.

kotborealis commented 2 years ago

Hey, thanks for this issue! Actually, this library was written as an attempt to get familiar with rust, and I didn't really plan on supporting it. I'll try to find some time tomorrow to fix it though.