Skip to content

Commit

Permalink
Update versions
Browse files Browse the repository at this point in the history
Update next release versions.

Update Swagger UI to 4.15.5 and update dependencies.
  • Loading branch information
juhaku committed Jan 19, 2023
1 parent 647dcaa commit 13a3aae
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ Add minimal dependency declaration to Cargo.toml.

```toml
[dependencies]
utoipa = "2"
utoipa = "3"
```

To enable more features such as use actix framework extras you could define the
dependency as follows.

```toml
[dependencies]
utoipa = { version = "2", features = ["actix_extras"] }
utoipa = { version = "3", features = ["actix_extras"] }
```

**Note!** To use `utoipa` together with Swagger UI you can use the [utoipa-swagger-ui](https://docs.rs/utoipa-swagger-ui/) crate.
Expand Down
10 changes: 5 additions & 5 deletions utoipa-gen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "utoipa-gen"
description = "Code generation implementation for utoipa"
version = "2.4.2"
version = "3.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand All @@ -17,7 +17,7 @@ proc-macro2 = "1.0"
syn = { version = "1.0", features = ["full"] }
quote = "1.0"
proc-macro-error = "1.0"
regex = { version = "1.5", optional = true }
regex = { version = "1.7", optional = true }
lazy_static = { version = "1.4", optional = true }
uuid = { version = "1", optional = true }

Expand All @@ -28,12 +28,12 @@ serde = "1"
actix-web = { version = "4", features = ["macros"], default-features = false }
axum = "0.6"
paste = "1"
rocket = "0.5.0-rc.1"
smallvec = { version = "1.9.0", features = ["serde"] }
rocket = "0.5.0-rc.2"
smallvec = { version = "1.10.0", features = ["serde"] }
rust_decimal = "1"
chrono = { version = "0.4", features = ["serde"] }
assert-json-diff = "2"
time = { version = "0.3.11", features = ["serde-human-readable"] }
time = { version = "0.3", features = ["serde-human-readable"] }

[features]
debug = ["syn/extra-traits"]
Expand Down
60 changes: 30 additions & 30 deletions utoipa-gen/tests/openapi_derive.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use assert_json_diff::assert_json_eq;
use assert_json_diff::{assert_json_eq, assert_json_include};
use serde_json::{json, Value};
use utoipa::{
openapi::{RefOr, Response, ResponseBuilder},
Expand Down Expand Up @@ -201,21 +201,21 @@ fn derive_openapi_with_custom_info() {
let value = serde_json::to_value(&ApiDoc::openapi()).unwrap();
let info = value.pointer("/info");

assert_json_eq!(
info,
json!(
{
"title": "title override",
"description": "description override",
"license": {
"name": "MIT OR Apache-2.0",
},
"version": "2.4.2",
"contact": {
"name": "Test"
}
}
)
assert_json_include!(
actual: info,
expected:
json!(
{
"title": "title override",
"description": "description override",
"license": {
"name": "MIT OR Apache-2.0",
},
"contact": {
"name": "Test"
}
}
)
)
}

Expand All @@ -232,20 +232,20 @@ fn derive_openapi_with_include_str_description() {
let value = serde_json::to_value(&ApiDoc::openapi()).unwrap();
let info = value.pointer("/info");

assert_json_eq!(
info,
json!(
{
"title": "title override",
"description": "this is include description\n",
"license": {
"name": "MIT OR Apache-2.0",
},
"version": "2.4.2",
"contact": {
"name": "Test"
assert_json_include!(
actual: info,
expected:
json!(
{
"title": "title override",
"description": "this is include description\n",
"license": {
"name": "MIT OR Apache-2.0",
},
"contact": {
"name": "Test"
}
}
}
)
)
)
}
9 changes: 4 additions & 5 deletions utoipa-swagger-ui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "utoipa-swagger-ui"
description = "Swagger UI for utoipa"
version = "3.0.1"
version = "3.0.2"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand All @@ -20,10 +20,9 @@ mime_guess = { version = "2.0" }
actix-web = { version = "4", features = [
"macros",
], optional = true, default-features = false }
rocket = { version = "0.5.0-rc.1", features = ["json"], optional = true }
rocket = { version = "0.5.0-rc.2", features = ["json"], optional = true }
axum = { version = "0.6", optional = true }
utoipa = { version = "2", path = "../utoipa", default-features = false, features = [
] }
utoipa = { version = "3", path = "../utoipa" }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }

Expand All @@ -36,4 +35,4 @@ rustdoc-args = ["--cfg", "doc_cfg"]

[build-dependencies]
zip = { version = "0.6", default-features = false, features = ["deflate"] }
regex = "1.5"
regex = "1.7"
5 changes: 3 additions & 2 deletions utoipa-swagger-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ works as a bridge for serving the OpenAPI documetation created with
**Currently implemented boiler plate for:**

* **actix-web** `version >= 4`
* **rocket** `version >=0.5.0-rc.1`
* **rocket** `version >=0.5.0-rc.2`
* **axum** `version >=0.6`

Serving Swagger UI is framework independant thus this crate also supports serving the Swagger UI with
other frameworks as well. With other frameworks there is bit more manual implementation to be done. See
more details at [serve](https://docs.rs/utoipa-swagger-ui/latest/utoipa_swagger_ui/fn.serve.html) or
[examples](https://github.com/juhaku/utoipa/tree/master/examples).

# Features
# Crate Features

* **actix-web** Enables actix-web integration with pre-configured SwaggerUI service factory allowing
users to use the Swagger UI without a hazzle.
Expand All @@ -30,6 +30,7 @@ more details at [serve](https://docs.rs/utoipa-swagger-ui/latest/utoipa_swagger_
hazzle free.
* **debug-embed** Enables `debug-embed` feature on `rust_embed` crate to allow embedding files in debug
builds as well.

# Install

Use only the raw types without any boiler plate implementation.
Expand Down
2 changes: 1 addition & 1 deletion utoipa-swagger-ui/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::{
use regex::Regex;
use zip::{result::ZipError, ZipArchive};

const SWAGGER_UI_DIST_ZIP: &str = "swagger-ui-4.14.0";
const SWAGGER_UI_DIST_ZIP: &str = "swagger-ui-4.15.5";

fn main() {
println!("cargo:rerun-if-changed=res/{}.zip", SWAGGER_UI_DIST_ZIP);
Expand Down
Binary file removed utoipa-swagger-ui/res/swagger-ui-4.14.0.zip
Binary file not shown.
Binary file added utoipa-swagger-ui/res/swagger-ui-4.15.5.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions utoipa-swagger-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! **Currently implemented boiler plate for:**
//!
//! * **actix-web** `version >= 4`
//! * **rocket** `version >=0.5.0-rc.1`
//! * **rocket** `version >=0.5.0-rc.2`
//! * **axum** `version >=0.6`
//!
//! Serving Swagger UI is framework independent thus this crate also supports serving the Swagger UI with
Expand All @@ -17,7 +17,7 @@
//!
//! [examples]: <https://github.com/juhaku/utoipa/tree/master/examples>
//!
//! # Features
//! # Crate Features
//!
//! * **actix-web** Enables `actix-web` integration with pre-configured SwaggerUI service factory allowing
//! users to use the Swagger UI without a hassle.
Expand Down
6 changes: 3 additions & 3 deletions utoipa/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "utoipa"
description = "Compile time generated OpenAPI documentation for Rust"
version = "2.4.2"
version = "3.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down Expand Up @@ -38,12 +38,12 @@ preserve_order = []
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
serde_yaml = { version = "0.9", optional = true }
utoipa-gen = { version = "2.4.2", path = "../utoipa-gen" }
utoipa-gen = { version = "3.0.0", path = "../utoipa-gen" }
indexmap = { version = "1", features = ["serde"] }

[dev-dependencies]
assert-json-diff = "2"

[package.metadata.docs.rs]
features = ["actix_extras", "openapi_extensions", "yaml"]
features = ["actix_extras", "openapi_extensions", "yaml", "uuid"]
rustdoc-args = ["--cfg", "doc_cfg"]
4 changes: 2 additions & 2 deletions utoipa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@
//! Add minimal dependency declaration to Cargo.toml.
//! ```toml
//! [dependencies]
//! utoipa = "2"
//! utoipa = "3"
//! ```
//!
//! To enable more features such as use actix framework extras you could define the
//! dependency as follows.
//! ```toml
//! [dependencies]
//! utoipa = { version = "2", features = ["actix_extras"] }
//! utoipa = { version = "3", features = ["actix_extras"] }
//! ```
//!
//! **Note!** To use `utoipa` together with Swagger UI you can use the [`utoipa-swagger-ui`][utoipa_swagger] crate.
Expand Down

0 comments on commit 13a3aae

Please sign in to comment.