Skip to content

Commit

Permalink
Rename websocket example and reformat toml files.
Browse files Browse the repository at this point in the history
- Rename `websocket` example because of crate name conflict triggering `cargo audit`
  • Loading branch information
ralpha committed Nov 7, 2024
1 parent ff10a02 commit 96a65fb
Show file tree
Hide file tree
Showing 18 changed files with 60 additions and 56 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions examples/custom_schema/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "custom_schema"
version = "0.1.0"
authors = [ "Ralph Bisschops <[email protected]>" ]
authors = ["Ralph Bisschops <[email protected]>"]
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 }
10 changes: 7 additions & 3 deletions examples/dyn_templates/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[package]
name = "dyn_templates"
version = "0.1.0"
authors = [ "Ralph Bisschops <[email protected]>" ]
authors = ["Ralph Bisschops <[email protected]>"]
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"
4 changes: 2 additions & 2 deletions examples/json-web-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "json_web_api"
version = "0.1.0"
authors = [ "Graham Esau <[email protected]>" ]
authors = ["Graham Esau <[email protected]>"]
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 }
2 changes: 1 addition & 1 deletion examples/nested/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
4 changes: 2 additions & 2 deletions examples/openapi_attributes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "openapi_attributes"
version = "0.1.0"
authors = [ "Ralph Bisschops <[email protected]>" ]
authors = ["Ralph Bisschops <[email protected]>"]
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 }
4 changes: 2 additions & 2 deletions examples/raw_identifiers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "raw_identifiers"
version = "0.1.0"
authors = [ "Alex Payne <[email protected]>" ]
authors = ["Alex Payne <[email protected]>"]
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"] }
4 changes: 2 additions & 2 deletions examples/secure_request_guard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions examples/special-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "special-types"
version = "0.1.0"
authors = [ "Ralph Bisschops <[email protected]>" ]
authors = ["Ralph Bisschops <[email protected]>"]
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 }
4 changes: 2 additions & 2 deletions examples/streams/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "streams"
version = "0.1.0"
authors = [ "Ralph Bisschops <[email protected]>" ]
authors = ["Ralph Bisschops <[email protected]>"]
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 }
8 changes: 4 additions & 4 deletions examples/uuid_usage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
11 changes: 0 additions & 11 deletions examples/websocket/Cargo.toml

This file was deleted.

File renamed without changes.
11 changes: 11 additions & 0 deletions examples/websocket_usage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "websocket_usage"
version = "0.1.0"
authors = ["Ralph Bisschops <[email protected]>"]
edition = "2021"

[dependencies]
rocket = { workspace = true }
rocket_ws = { workspace = true }
rocket_okapi = { path = "../../rocket-okapi", features = ["swagger", "rapidoc", "rocket_ws"] }
serde = { workspace = true }
File renamed without changes.
12 changes: 6 additions & 6 deletions okapi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>" ]
authors = ["Graham Esau <[email protected]>"]
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
6 changes: 3 additions & 3 deletions rocket-okapi-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>" ]
authors = ["Graham Esau <[email protected]>"]
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
Expand Down
24 changes: 12 additions & 12 deletions rocket-okapi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>" ]
authors = ["Graham Esau <[email protected]>"]
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 }
Expand All @@ -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

0 comments on commit 96a65fb

Please sign in to comment.