From 96a65fb301fc8cc7acb5d67e968f837dbc99786f Mon Sep 17 00:00:00 2001 From: ralpha Date: Thu, 7 Nov 2024 22:17:44 +0100 Subject: [PATCH] Rename `websocket` example and reformat toml files. - Rename `websocket` example because of crate name conflict triggering `cargo audit` --- Cargo.toml | 4 ++-- examples/custom_schema/Cargo.toml | 4 ++-- examples/dyn_templates/Cargo.toml | 10 +++++--- examples/json-web-api/Cargo.toml | 4 ++-- examples/nested/Cargo.toml | 2 +- examples/openapi_attributes/Cargo.toml | 4 ++-- examples/raw_identifiers/Cargo.toml | 4 ++-- examples/secure_request_guard/Cargo.toml | 4 ++-- examples/special-types/Cargo.toml | 4 ++-- examples/streams/Cargo.toml | 4 ++-- examples/uuid_usage/Cargo.toml | 8 +++---- examples/websocket/Cargo.toml | 11 --------- .../{websocket => websocket_usage}/.gitignore | 0 examples/websocket_usage/Cargo.toml | 11 +++++++++ .../src/main.rs | 0 okapi/Cargo.toml | 12 +++++----- rocket-okapi-codegen/Cargo.toml | 6 ++--- rocket-okapi/Cargo.toml | 24 +++++++++---------- 18 files changed, 60 insertions(+), 56 deletions(-) delete mode 100644 examples/websocket/Cargo.toml rename examples/{websocket => websocket_usage}/.gitignore (100%) create mode 100644 examples/websocket_usage/Cargo.toml rename examples/{websocket => websocket_usage}/src/main.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 69f4bd65..20d02283 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,13 @@ members = [ "examples/dyn_templates", "examples/openapi_attributes", "examples/raw_identifiers", - "examples/websocket", + "examples/websocket_usage", ] resolver = "2" [workspace.dependencies] log = "0.4" -rocket = { version = "=0.5.1", default-features = false, features = [ "json" ] } +rocket = { version = "=0.5.1", default-features = false, features = ["json"] } rocket_ws = "0.1.1" rocket_http = "=0.5.1" rocket_dyn_templates = "=0.2.0" diff --git a/examples/custom_schema/Cargo.toml b/examples/custom_schema/Cargo.toml index d5fe0e01..f50a0ee8 100644 --- a/examples/custom_schema/Cargo.toml +++ b/examples/custom_schema/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "custom_schema" version = "0.1.0" -authors = [ "Ralph Bisschops " ] +authors = ["Ralph Bisschops "] edition = "2021" [dependencies] rocket = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "swagger", "rapidoc" ] } +rocket_okapi = { path = "../../rocket-okapi", features = ["swagger", "rapidoc"] } serde = { workspace = true } serde_json = { workspace = true } diff --git a/examples/dyn_templates/Cargo.toml b/examples/dyn_templates/Cargo.toml index 0bd9e5fe..bf5a40b3 100644 --- a/examples/dyn_templates/Cargo.toml +++ b/examples/dyn_templates/Cargo.toml @@ -1,13 +1,17 @@ [package] name = "dyn_templates" version = "0.1.0" -authors = [ "Ralph Bisschops " ] +authors = ["Ralph Bisschops "] edition = "2021" [dependencies] rocket = { workspace = true } schemars = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "swagger", "rapidoc", "rocket_dyn_templates" ] } +rocket_okapi = { path = "../../rocket-okapi", features = [ + "swagger", + "rapidoc", + "rocket_dyn_templates", +] } serde = { workspace = true } -rocket_dyn_templates = { workspace = true, features = [ "handlebars" ] } +rocket_dyn_templates = { workspace = true, features = ["handlebars"] } handlebars = "5.0.0" diff --git a/examples/json-web-api/Cargo.toml b/examples/json-web-api/Cargo.toml index eadcf93d..70923b99 100644 --- a/examples/json-web-api/Cargo.toml +++ b/examples/json-web-api/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "json_web_api" version = "0.1.0" -authors = [ "Graham Esau " ] +authors = ["Graham Esau "] edition = "2021" [dependencies] rocket = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "swagger", "rapidoc" ] } +rocket_okapi = { path = "../../rocket-okapi", features = ["swagger", "rapidoc"] } serde = { workspace = true } diff --git a/examples/nested/Cargo.toml b/examples/nested/Cargo.toml index 02701d36..a0ccdd94 100644 --- a/examples/nested/Cargo.toml +++ b/examples/nested/Cargo.toml @@ -9,6 +9,6 @@ edition = "2021" [dependencies] rocket = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "rapidoc" ] } +rocket_okapi = { path = "../../rocket-okapi", features = ["rapidoc"] } serde = { workspace = true } serde_json = { workspace = true } diff --git a/examples/openapi_attributes/Cargo.toml b/examples/openapi_attributes/Cargo.toml index c7cfd589..c150a564 100644 --- a/examples/openapi_attributes/Cargo.toml +++ b/examples/openapi_attributes/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "openapi_attributes" version = "0.1.0" -authors = [ "Ralph Bisschops " ] +authors = ["Ralph Bisschops "] edition = "2021" [dependencies] rocket = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "swagger", "rapidoc" ] } +rocket_okapi = { path = "../../rocket-okapi", features = ["swagger", "rapidoc"] } serde = { workspace = true } diff --git a/examples/raw_identifiers/Cargo.toml b/examples/raw_identifiers/Cargo.toml index 86ac959f..ab209b0d 100644 --- a/examples/raw_identifiers/Cargo.toml +++ b/examples/raw_identifiers/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "raw_identifiers" version = "0.1.0" -authors = [ "Alex Payne " ] +authors = ["Alex Payne "] edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] rocket = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "rapidoc", "swagger" ] } +rocket_okapi = { path = "../../rocket-okapi", features = ["rapidoc", "swagger"] } diff --git a/examples/secure_request_guard/Cargo.toml b/examples/secure_request_guard/Cargo.toml index 479c8533..a88b6a29 100644 --- a/examples/secure_request_guard/Cargo.toml +++ b/examples/secure_request_guard/Cargo.toml @@ -8,8 +8,8 @@ authors = [ edition = "2021" [dependencies] -rocket = { workspace = true, features = [ "json", "secrets" ] } -rocket_okapi = { path = "../../rocket-okapi", features = [ "rapidoc", "swagger", "secrets" ] } +rocket = { workspace = true, features = ["json", "secrets"] } +rocket_okapi = { path = "../../rocket-okapi", features = ["rapidoc", "swagger", "secrets"] } serde = { workspace = true } serde_json = { workspace = true } tokio = "1.6" diff --git a/examples/special-types/Cargo.toml b/examples/special-types/Cargo.toml index e11dfd43..e039c296 100644 --- a/examples/special-types/Cargo.toml +++ b/examples/special-types/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "special-types" version = "0.1.0" -authors = [ "Ralph Bisschops " ] +authors = ["Ralph Bisschops "] edition = "2021" [dependencies] rocket = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "swagger", "rapidoc" ] } +rocket_okapi = { path = "../../rocket-okapi", features = ["swagger", "rapidoc"] } serde = { workspace = true } diff --git a/examples/streams/Cargo.toml b/examples/streams/Cargo.toml index ca33bcce..0c6e6de6 100644 --- a/examples/streams/Cargo.toml +++ b/examples/streams/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "streams" version = "0.1.0" -authors = [ "Ralph Bisschops " ] +authors = ["Ralph Bisschops "] edition = "2021" [dependencies] rocket = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "swagger", "rapidoc" ] } +rocket_okapi = { path = "../../rocket-okapi", features = ["swagger", "rapidoc"] } serde = { workspace = true } diff --git a/examples/uuid_usage/Cargo.toml b/examples/uuid_usage/Cargo.toml index 721bd2a1..9b0a34bc 100644 --- a/examples/uuid_usage/Cargo.toml +++ b/examples/uuid_usage/Cargo.toml @@ -9,8 +9,8 @@ authors = [ edition = "2021" [dependencies] -rocket = { workspace = true, features = [ "json", "uuid" ] } -schemars = { workspace = true, features = [ "uuid1" ] } -rocket_okapi = { path = "../../rocket-okapi", features = [ "swagger", "rapidoc", "uuid" ] } +rocket = { workspace = true, features = ["json", "uuid"] } +schemars = { workspace = true, features = ["uuid1"] } +rocket_okapi = { path = "../../rocket-okapi", features = ["swagger", "rapidoc", "uuid"] } serde = { workspace = true } -uuid = { version = "1.1.1", features = [ "v4" ] } +uuid = { version = "1.1.1", features = ["v4"] } diff --git a/examples/websocket/Cargo.toml b/examples/websocket/Cargo.toml deleted file mode 100644 index c8ac9661..00000000 --- a/examples/websocket/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "websocket" -version = "0.1.0" -authors = [ "Ralph Bisschops " ] -edition = "2021" - -[dependencies] -rocket = { workspace = true } -rocket_ws = { workspace = true } -rocket_okapi = { path = "../../rocket-okapi", features = [ "swagger", "rapidoc", "rocket_ws" ] } -serde = { workspace = true } diff --git a/examples/websocket/.gitignore b/examples/websocket_usage/.gitignore similarity index 100% rename from examples/websocket/.gitignore rename to examples/websocket_usage/.gitignore diff --git a/examples/websocket_usage/Cargo.toml b/examples/websocket_usage/Cargo.toml new file mode 100644 index 00000000..98403454 --- /dev/null +++ b/examples/websocket_usage/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "websocket_usage" +version = "0.1.0" +authors = ["Ralph Bisschops "] +edition = "2021" + +[dependencies] +rocket = { workspace = true } +rocket_ws = { workspace = true } +rocket_okapi = { path = "../../rocket-okapi", features = ["swagger", "rapidoc", "rocket_ws"] } +serde = { workspace = true } diff --git a/examples/websocket/src/main.rs b/examples/websocket_usage/src/main.rs similarity index 100% rename from examples/websocket/src/main.rs rename to examples/websocket_usage/src/main.rs diff --git a/okapi/Cargo.toml b/okapi/Cargo.toml index 81d31855..60e23bec 100644 --- a/okapi/Cargo.toml +++ b/okapi/Cargo.toml @@ -3,24 +3,24 @@ name = "okapi" description = "Structs for OpenAPI (AKA Swagger) documents" repository = "https://github.com/GREsau/okapi" version = "0.7.0" -authors = [ "Graham Esau " ] +authors = ["Graham Esau "] edition = "2021" license = "MIT" readme = "../README.md" -keywords = [ "rust", "openapi", "swagger" ] -categories = [ "web-programming" ] +keywords = ["rust", "openapi", "swagger"] +categories = ["web-programming"] [dependencies] schemars = { workspace = true } -serde = { workspace = true, features = [ "derive" ] } +serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } log = { workspace = true } [features] # Implements `JsonSchema` for `Schemars` and `Okapi` types themselves. -impl_json_schema = [ "schemars/impl_json_schema" ] +impl_json_schema = ["schemars/impl_json_schema"] # Preserve the order of items in schema and other part of the OpenAPI documentation. -preserve_order = [ "schemars/preserve_order" ] +preserve_order = ["schemars/preserve_order"] [package.metadata.docs.rs] all-features = true diff --git a/rocket-okapi-codegen/Cargo.toml b/rocket-okapi-codegen/Cargo.toml index c7a67368..1ecca8a2 100644 --- a/rocket-okapi-codegen/Cargo.toml +++ b/rocket-okapi-codegen/Cargo.toml @@ -3,12 +3,12 @@ name = "rocket_okapi_codegen" description = "Macros supporting rocket_okapi" repository = "https://github.com/GREsau/okapi" version = "0.8.0" -authors = [ "Graham Esau " ] +authors = ["Graham Esau "] edition = "2021" license = "MIT" readme = "../README.md" -keywords = [ "rust", "openapi", "swagger", "rocket" ] -categories = [ "web-programming" ] +keywords = ["rust", "openapi", "swagger", "rocket"] +categories = ["web-programming"] [lib] proc-macro = true diff --git a/rocket-okapi/Cargo.toml b/rocket-okapi/Cargo.toml index 42a056fa..56a6dee3 100644 --- a/rocket-okapi/Cargo.toml +++ b/rocket-okapi/Cargo.toml @@ -3,12 +3,12 @@ name = "rocket_okapi" description = "OpenAPI (AKA Swagger) document generation for Rocket applications" repository = "https://github.com/GREsau/okapi" version = "0.8.0" -authors = [ "Graham Esau " ] +authors = ["Graham Esau "] edition = "2021" license = "MIT" readme = "../README.md" -keywords = [ "rust", "openapi", "swagger", "rocket" ] -categories = [ "web-programming" ] +keywords = ["rust", "openapi", "swagger", "rocket"] +categories = ["web-programming"] [dependencies] rocket = { workspace = true } @@ -27,30 +27,30 @@ rocket_sync_db_pools = { workspace = true, optional = true } rocket_ws = { workspace = true, optional = true } [dev-dependencies] -rocket_sync_db_pools = { version = "0.1.0", features = [ "diesel_sqlite_pool" ] } +rocket_sync_db_pools = { version = "0.1.0", features = ["diesel_sqlite_pool"] } [features] -default = [ "preserve_order" ] +default = ["preserve_order"] # Preserve the order of items in schema and other part of the OpenAPI documentation. -preserve_order = [ "schemars/preserve_order", "okapi/preserve_order" ] +preserve_order = ["schemars/preserve_order", "okapi/preserve_order"] # Feature to enable Swagger UI for rendering documentation # Project: https://github.com/swagger-api/swagger-ui -swagger = [ ] +swagger = [] # Feature to enable RapiDoc for rendering documentation # Project: https://github.com/mrin9/RapiDoc -rapidoc = [ ] +rapidoc = [] # Allow the use of UUIDs -uuid = [ "rocket/uuid", "schemars/uuid" ] +uuid = ["rocket/uuid", "schemars/uuid"] # Re-export Rocket feature flag # https://docs.rs/rocket/latest/rocket/serde/msgpack/struct.MsgPack.html -msgpack = [ "rocket/msgpack" ] +msgpack = ["rocket/msgpack"] # Re-export Rocket feature flag # https://rocket.rs/v0.5/guide/requests/#secret-key -secrets = [ "rocket/secrets" ] +secrets = ["rocket/secrets"] # Re-export Rocket feature flag # https://rocket.rs/v0.5/guide/configuration/#mutual-tls -mtls = [ "rocket/mtls" ] +mtls = ["rocket/mtls"] [package.metadata.docs.rs] all-features = true