Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ohkami/src/format/builtin/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<'req, T: Incoming<'req>> FromRequest<'req> for Query<T> {
if required {
openapi::Parameter::in_query(name, schema)
} else {
openapi::Parameter::maybe_in_query(name, schema)
openapi::Parameter::in_query_optional(name, schema)
}
).collect()
)
Expand Down
2 changes: 1 addition & 1 deletion ohkami/src/typed/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl<'req, Fields: crate::format::bound::Incoming<'req>> FromRequest<'req> for C
if required {
crate::openapi::Parameter::in_cookie(name, schema)
} else {
crate::openapi::Parameter::maybe_in_cookie(name, schema)
crate::openapi::Parameter::in_cookie_optional(name, schema)
}
).collect()
)
Expand Down
8 changes: 4 additions & 4 deletions ohkami_openapi/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Parameter {
description:None, deprecated:false, style:None, explode:false,
}
}
pub fn maybe_in_path(schema: impl Into<SchemaRef>) -> Self {
pub fn in_path_optional(schema: impl Into<SchemaRef>) -> Self {
Self {
kind: ParameterKind::path,
name: "".into(), // initialize with empty name (will be assigned later by `Operation::assign_path_param_name`)
Expand All @@ -67,7 +67,7 @@ impl Parameter {
description:None, deprecated:false, style:None, explode:false,
}
}
pub fn maybe_in_query(name: &'static str, schema: impl Into<SchemaRef>) -> Self {
pub fn in_query_optional(name: &'static str, schema: impl Into<SchemaRef>) -> Self {
Self {
kind: ParameterKind::query,
name: name.into(),
Expand All @@ -86,7 +86,7 @@ impl Parameter {
description:None, deprecated:false, style:None, explode:false,
}
}
pub fn maybe_in_header(name: &'static str, schema: impl Into<SchemaRef>) -> Self {
pub fn in_header_optional(name: &'static str, schema: impl Into<SchemaRef>) -> Self {
Self {
kind: ParameterKind::header,
name: name.into(),
Expand All @@ -105,7 +105,7 @@ impl Parameter {
description:None, deprecated:false, style:None, explode:false,
}
}
pub fn maybe_in_cookie(name: &'static str, schema: impl Into<SchemaRef>) -> Self {
pub fn in_cookie_optional(name: &'static str, schema: impl Into<SchemaRef>) -> Self {
Self {
kind: ParameterKind::cookie,
name: name.into(),
Expand Down