feat: add support for Cbor

This commit is contained in:
gengteng
2024-04-14 21:41:16 +08:00
parent 6888a7bbdf
commit af02a87ef1
7 changed files with 351 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "axum-valid"
version = "0.17.0"
version = "0.18.0"
description = "Provides validation extractors for your Axum application, allowing you to validate data using validator, garde, validify or all of them."
authors = ["GengTeng <me@gteng.org>"]
license = "MIT"
@@ -27,8 +27,8 @@ features = ["full", "aide"]
[dependencies]
axum = { version = "0.7.3", default-features = false }
garde = { version = "0.18.0", optional = true }
validator = { version = "0.18.0", optional = true }
validify = { version = "1.3.0", optional = true }
validator = { version = "0.18.1", optional = true }
validify = { version = "1.4.0", optional = true }
[dependencies.axum-extra]
version = "0.9.0"
@@ -36,7 +36,7 @@ default-features = false
optional = true
[dependencies.axum-serde]
version = "0.3.0"
version = "0.4.1"
optional = true
[dependencies.axum_typed_multipart]
@@ -55,13 +55,14 @@ optional = true
anyhow = "1.0.75"
axum = { version = "0.7.1", features = ["macros"] }
tokio = { version = "1.34.0", features = ["full"] }
reqwest = { version = "0.11.23", features = ["json", "multipart"] }
reqwest = { version = "0.12.3", features = ["json", "multipart"] }
serde = { version = "1.0.195", features = ["derive"] }
validator = { version = "0.18.0", features = ["derive"] }
garde = { version = "0.18.0", features = ["serde", "derive"] }
serde_json = "1.0.108"
serde_yaml = "0.9.27"
quick-xml = { version = "0.31.0", features = ["serialize"] }
ciborium = { version = "0.2.2" }
toml = "0.8.8"
mime = "0.3.17"
prost = "0.12.3"
@@ -83,6 +84,7 @@ yaml = ["dep:axum-serde", "axum-serde/yaml"]
xml = ["dep:axum-serde", "axum-serde/xml"]
toml = ["dep:axum-serde", "axum-serde/toml"]
sonic = ["dep:axum-serde", "axum-serde/sonic"]
cbor = ["dep:axum-serde", "axum-serde/cbor"]
typed_multipart = ["dep:axum_typed_multipart"]
into_json = ["json", "dep:serde", "garde?/serde"]
422 = []
@@ -92,7 +94,7 @@ extra_query = ["extra", "axum-extra/query"]
extra_form = ["extra", "axum-extra/form"]
extra_protobuf = ["extra", "axum-extra/protobuf"]
all_extra_types = ["extra", "typed_header", "extra_typed_path", "extra_query", "extra_form", "extra_protobuf"]
all_types = ["json", "form", "query", "msgpack", "yaml", "xml", "toml", "sonic", "all_extra_types", "typed_multipart"]
all_types = ["json", "form", "query", "msgpack", "yaml", "xml", "toml", "sonic", "cbor", "all_extra_types", "typed_multipart"]
full_validator = ["validator", "all_types", "422", "into_json"]
full_garde = ["garde", "all_types", "422", "into_json"]
full_validify = ["validify", "all_types", "422", "into_json"]