docs.rs failed to build swagger-ui-0.1.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
swagger-ui-0.1.5
swagger-ui
Swagger-ui is a crate to use in rust web-servers to render OpenAPI specification, using swagger-ui JS library.
This crate downloads swagger-ui-dist from npm during build and embeds it into your binary, using rust-embed.
It also provides bindings for rocket.
Usage
Rocket
Use this crate with rocket to serve swagger-ui
for your OpenAPI specification.
Use rocket
feature in your Cargo.toml
:
= { = "0.1", = ["rocket"] }
Or install rocket-swagger-ui
:
= "0.1"
= "0.1"
See rocket-swagger-ui/examples/basic.rs for a full example:
extern crate rocket;
use rocket_swagger_ui;
use swagger_ui;
Standalone
This library isn't really useful without webserver bindings.
You can get files from swagger-ui-dist
and create configuration
for swagger-ui
, which can be serialized to json via serde.
See ../swagger-ui/examples/basic.rs for a full example:
use ;