Skip to content

Commit 7723944

Browse files
committed
v0.5.0
1 parent cb36731 commit 7723944

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

examples/json-web-api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
[dependencies]
88
schemars = "0.7.0"
99
okapi = { version = "0.4.0", path = "../../okapi" }
10-
rocket_okapi = { version = "0.4.1", path = "../../rocket-okapi" }
10+
rocket_okapi = { version = "0.5.0", path = "../../rocket-okapi" }
1111
rocket = { version = "0.4.3", default-features = false }
1212
serde = "1.0"
1313

rocket-okapi-codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rocket_okapi_codegen"
33
description = "Macros supporting rocket_okapi"
44
repository = "https://github.com/GREsau/okapi"
5-
version = "0.4.1"
5+
version = "0.5.0"
66
authors = ["Graham Esau <[email protected]>"]
77
edition = "2018"
88
license = "MIT"

rocket-okapi/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rocket_okapi"
33
description = "OpenAPI (AKA Swagger) document generation for Rocket applications"
44
repository = "https://github.com/GREsau/okapi"
5-
version = "0.4.1"
5+
version = "0.5.0"
66
authors = ["Graham Esau <[email protected]>"]
77
edition = "2018"
88
license = "MIT"
@@ -11,7 +11,7 @@ keywords = ["rust", "openapi", "swagger", "rocket"]
1111
[dependencies]
1212
schemars = "0.7.0"
1313
okapi = { version = "0.4.0", path = "../okapi" }
14-
rocket_okapi_codegen = { version = "=0.4.1", path = "../rocket-okapi-codegen" }
14+
rocket_okapi_codegen = { version = "=0.5.0", path = "../rocket-okapi-codegen" }
1515
rocket = { version = "0.4.3", default-features = false }
1616
serde = "1.0"
1717
serde_json = "1.0"

rocket-okapi/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
//! First, add the following lines to your `Cargo.toml`
99
//! ```toml
1010
//! [dependencies]
11-
//! rocket_okapi = "0.3"
12-
//! schemars = "0.6"
13-
//! okapi = { version = "0.3", features = ["derive_json_schema"] }
11+
//! rocket_okapi = "0.5"
12+
//! schemars = "0.7"
13+
//! okapi = { version = "0.5", features = ["derive_json_schema"] }
1414
//! ```
1515
//! To add documentation to a set of endpoints, a couple of steps are required. The request and
1616
//! response types of the endpoint must implement `JsonSchema`. Secondly, the function must be
@@ -22,17 +22,17 @@
2222
//! ### Example
2323
//! ```rust, no_run
2424
//! #![feature(decl_macro, proc_macro_hygiene)]
25-
//!
25+
//!
2626
//! use rocket::get;
2727
//! use rocket_contrib::json::Json;
2828
//! use rocket_okapi::{openapi, routes_with_openapi, JsonSchema};
2929
//! use rocket_okapi::swagger_ui::{make_swagger_ui, SwaggerUIConfig};
30-
//!
30+
//!
3131
//! #[derive(serde::Serialize, JsonSchema)]
3232
//! struct Response {
3333
//! reply: String,
3434
//! }
35-
//!
35+
//!
3636
//! #[openapi]
3737
//! #[get("/")]
3838
//! fn my_controller() -> Json<Response> {
@@ -43,13 +43,13 @@
4343
//!
4444
//! fn get_docs() -> SwaggerUIConfig {
4545
//! use rocket_okapi::swagger_ui::UrlObject;
46-
//!
46+
//!
4747
//! SwaggerUIConfig {
4848
//! url: "/my_resource/openapi.json".to_string(),
4949
//! urls: vec![UrlObject::new("My Resource", "/v1/company/openapi.json")],
5050
//! }
5151
//! }
52-
//!
52+
//!
5353
//! fn main() {
5454
//! rocket::ignite()
5555
//! .mount("/my_resource", routes_with_openapi![my_controller])
@@ -60,7 +60,7 @@
6060
6161
mod error;
6262

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

0 commit comments

Comments
 (0)