Skip to content

Commit

Permalink
fix parameters macro
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtbuilds committed Sep 27, 2024
1 parent af2f323 commit a0a8191
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@ macro_rules! impl_oa_schema_passthrough {
macro_rules! impl_parameters {
// Pattern for generic axum types with tuple generics (A1, A2, etc.)
($($path:ident)::+, $($A:ident),+) => {
impl<$($A: OaSchema),+> OaSchema for $($path)::+<($($A,)+)> {
fn schema() -> Schema {
impl<$($A: $crate::OaSchema),+> $crate::OaSchema for $($path)::+<($($A,)+)> {
fn schema() -> $crate::Schema {
panic!("Call parameters() for this type, not schema().");
}

fn parameters() -> Vec<ReferenceOr<oa::Parameter>> {
fn parameters() -> Vec<$crate::ReferenceOr<$crate::Parameter>> {
vec![
$(
ReferenceOr::Item(oa::Parameter::path(stringify!($A), $A::schema_ref())),
$crate::ReferenceOr::Item($crate::Parameter::path(stringify!($A), $A::schema_ref())),
)+
]
}

fn body_schema() -> Option<ReferenceOr<Schema>> {
fn body_schema() -> Option<$crate::ReferenceOr<$crate::Schema>> {
None
}
}
Expand Down

0 comments on commit a0a8191

Please sign in to comment.