fix: add status_range
This commit is contained in:
parent
196f65a384
commit
cb86b9d967
4 changed files with 6 additions and 4 deletions
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
|
@ -88,7 +88,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
msrv: [1.75.0]
|
||||
msrv: [1.83.0]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
|
@ -6,7 +6,7 @@ license = "MIT"
|
|||
documentation = "https://docs.rs/poem-ext/"
|
||||
repository = "https://github.com/Defelo/poem-ext"
|
||||
edition = "2021"
|
||||
rust-version = "1.75.0"
|
||||
rust-version = "1.83.0"
|
||||
|
||||
[features]
|
||||
default = ["sea-orm", "shield", "serde"]
|
||||
|
@ -17,8 +17,8 @@ serde = ["dep:serde"]
|
|||
[dependencies]
|
||||
itertools = { version = "0.13.0", default-features = false, features = ["use_std"] }
|
||||
paste = { version = "1.0.12", default-features = false }
|
||||
poem = { version = "3.0.0", default-features = false }
|
||||
poem-openapi = { version = "5.0.0", default-features = false }
|
||||
poem = { version = "3.1.7", default-features = false }
|
||||
poem-openapi = { version = "5.1.8", default-features = false }
|
||||
sea-orm = { version = "1.0.0", default-features = false, optional = true, features = ["macros"] }
|
||||
serde = { version = "1.0.167", default-features = false, optional = true }
|
||||
tokio-shield = { version = "0.1.0", default-features = false, optional = true }
|
||||
|
|
|
@ -187,6 +187,7 @@ macro_rules! response {
|
|||
::poem_openapi::registry::MetaResponse {
|
||||
description: ::std::concat!($($doc, "\n"),*),
|
||||
status: ::std::option::Option::Some($status),
|
||||
status_range: ::std::option::Option::None,
|
||||
content: <::poem_openapi::payload::Json<[< __ $name __ $var >]> as ::poem_openapi::ResponseContent>::media_types(),
|
||||
headers: vec![],
|
||||
},
|
||||
|
|
|
@ -53,6 +53,7 @@ pub(super) fn merge_meta_responses(
|
|||
// `Box::leak` is required because `description` has to be a `&'static str`
|
||||
description: Box::leak(description.into_boxed_str()),
|
||||
status,
|
||||
status_range: None,
|
||||
content: merge_meta_media_types(content),
|
||||
headers,
|
||||
}
|
||||
|
|
Reference in a new issue