feat: add support extractors from axum-serde

This commit is contained in:
gengteng
2023-11-30 15:50:33 +08:00
parent 587d8dc086
commit 566382f34a
10 changed files with 833 additions and 16 deletions

View File

@@ -35,6 +35,10 @@ version = "0.9.0"
default-features = false
optional = true
[dependencies.axum-serde]
version = "0.1.0"
optional = true
[dependencies.serde]
version = "1.0.193"
optional = true
@@ -48,7 +52,9 @@ reqwest = { version = "0.11.22", features = ["json", "multipart"] }
serde = { version = "1.0.189", features = ["derive"] }
validator = { version = "0.16.1", features = ["derive"] }
serde_json = "1.0.107"
serde_yaml = "0.9.25"
serde_yaml = "0.9.27"
quick-xml = { version = "0.31.0", features = ["serialize"] }
toml = "0.8.8"
mime = "0.3.17"
prost = "0.12.1"
once_cell = "1.18.0"
@@ -64,6 +70,10 @@ json = ["axum/json"]
form = ["axum/form"]
query = ["axum/query"]
typed_header = ["extra", "axum-extra/typed-header"]
msgpack = ["dep:axum-serde", "axum-serde/msgpack"]
yaml = ["dep:axum-serde", "axum-serde/yaml"]
xml = ["dep:axum-serde", "axum-serde/xml"]
toml = ["dep:axum-serde", "axum-serde/toml"]
into_json = ["json", "dep:serde"]
422 = []
extra = ["dep:axum-extra"]
@@ -72,7 +82,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", "all_extra_types"]
all_types = ["json", "form", "query", "msgpack", "yaml", "xml", "all_extra_types"]
full_validator = ["validator", "all_types", "422", "into_json"]
full_garde = ["garde", "all_types", "422", "into_json"]
full_validify = ["validify", "all_types", "422", "into_json"]