Skip to content

Commit

Permalink
v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GREsau committed May 24, 2020
1 parent cb36731 commit 7723944
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/json-web-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
schemars = "0.7.0"
okapi = { version = "0.4.0", path = "../../okapi" }
rocket_okapi = { version = "0.4.1", path = "../../rocket-okapi" }
rocket_okapi = { version = "0.5.0", path = "../../rocket-okapi" }
rocket = { version = "0.4.3", default-features = false }
serde = "1.0"

Expand Down
2 changes: 1 addition & 1 deletion rocket-okapi-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rocket_okapi_codegen"
description = "Macros supporting rocket_okapi"
repository = "https://github.com/GREsau/okapi"
version = "0.4.1"
version = "0.5.0"
authors = ["Graham Esau <gesau@hotmail.co.uk>"]
edition = "2018"
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions rocket-okapi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rocket_okapi"
description = "OpenAPI (AKA Swagger) document generation for Rocket applications"
repository = "https://github.com/GREsau/okapi"
version = "0.4.1"
version = "0.5.0"
authors = ["Graham Esau <gesau@hotmail.co.uk>"]
edition = "2018"
license = "MIT"
Expand All @@ -11,7 +11,7 @@ keywords = ["rust", "openapi", "swagger", "rocket"]
[dependencies]
schemars = "0.7.0"
okapi = { version = "0.4.0", path = "../okapi" }
rocket_okapi_codegen = { version = "=0.4.1", path = "../rocket-okapi-codegen" }
rocket_okapi_codegen = { version = "=0.5.0", path = "../rocket-okapi-codegen" }
rocket = { version = "0.4.3", default-features = false }
serde = "1.0"
serde_json = "1.0"
Expand Down
18 changes: 9 additions & 9 deletions rocket-okapi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
//! First, add the following lines to your `Cargo.toml`
//! ```toml
//! [dependencies]
//! rocket_okapi = "0.3"
//! schemars = "0.6"
//! okapi = { version = "0.3", features = ["derive_json_schema"] }
//! rocket_okapi = "0.5"
//! schemars = "0.7"
//! okapi = { version = "0.5", features = ["derive_json_schema"] }
//! ```
//! To add documentation to a set of endpoints, a couple of steps are required. The request and
//! response types of the endpoint must implement `JsonSchema`. Secondly, the function must be
Expand All @@ -22,17 +22,17 @@
//! ### Example
//! ```rust, no_run
//! #![feature(decl_macro, proc_macro_hygiene)]
//!
//!
//! use rocket::get;
//! use rocket_contrib::json::Json;
//! use rocket_okapi::{openapi, routes_with_openapi, JsonSchema};
//! use rocket_okapi::swagger_ui::{make_swagger_ui, SwaggerUIConfig};
//!
//!
//! #[derive(serde::Serialize, JsonSchema)]
//! struct Response {
//! reply: String,
//! }
//!
//!
//! #[openapi]
//! #[get("/")]
//! fn my_controller() -> Json<Response> {
Expand All @@ -43,13 +43,13 @@
//!
//! fn get_docs() -> SwaggerUIConfig {
//! use rocket_okapi::swagger_ui::UrlObject;
//!
//!
//! SwaggerUIConfig {
//! url: "/my_resource/openapi.json".to_string(),
//! urls: vec![UrlObject::new("My Resource", "/v1/company/openapi.json")],
//! }
//! }
//!
//!
//! fn main() {
//! rocket::ignite()
//! .mount("/my_resource", routes_with_openapi![my_controller])
Expand All @@ -60,7 +60,7 @@

mod error;

/// Contains the `Generator` struct, which you can use to manually control the way a struct is
/// Contains the `Generator` struct, which you can use to manually control the way a struct is
/// represented in the documentation.
pub mod gen;
/// Contains several `Rocket` `Handler`s, which are used for serving the json files and the swagger
Expand Down

0 comments on commit 7723944

Please sign in to comment.