Skip to content

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Nahuel-M committed Dec 23, 2024
1 parent 7cdce1c commit fc8d7c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion poem-openapi-derive/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ use syn::{
Path, ReturnType, Type,
};

use crate::parameter_style::ParameterStyle;
use crate::{
common_args::{
APIMethod, CodeSample, DefaultValue, ExampleValue, ExternalDocument, ExtraHeader,
},
error::GeneratorResult,
parameter_style::ParameterStyle,
utils::{
convert_oai_path, get_crate_name, get_description, get_summary_and_description,
optional_literal, optional_literal_string, parse_oai_attrs, remove_description,
Expand Down
8 changes: 5 additions & 3 deletions poem-openapi/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ pub enum ParameterStyle {
Simple,
/// Space-separated array values. Has effect only for non-exploded arrays.
SpaceDelimited,
/// Pipeline-separated array values. Has effect only for non-exploded arrays.
/// Pipeline-separated array values. Has effect only for non-exploded
/// arrays.
PipeDelimited,
/// Bracket-nested objects, e.g. `paramName[prop1]=value1&paramName[prop2]=value2`
/// Bracket-nested objects, e.g.
/// `paramName[prop1]=value1&paramName[prop2]=value2`
DeepObject,
}

Expand Down Expand Up @@ -96,7 +98,7 @@ pub struct ExtractParamOptions<T> {
/// separate parameters for each value of the array or key-value pair of the
/// map.
pub explode: bool,

/// The style of the parameter.
pub style: Option<ParameterStyle>,
}
Expand Down
6 changes: 3 additions & 3 deletions poem-openapi/src/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use poem::http::Method;
pub(crate) use ser::Document;
use serde::{ser::SerializeMap, Serialize, Serializer};
use serde_json::Value;
use crate::ParameterStyle;
use crate::types::Type;

use crate::{types::Type, ParameterStyle};

#[allow(clippy::trivially_copy_pass_by_ref)]
#[inline]
Expand Down Expand Up @@ -372,7 +372,7 @@ pub struct MetaOperationParam {
pub required: bool,
pub deprecated: bool,
pub explode: bool,
pub style: Option<ParameterStyle>
pub style: Option<ParameterStyle>,
}

#[derive(Debug, PartialEq, Serialize)]
Expand Down

0 comments on commit fc8d7c2

Please sign in to comment.