strongly type Parameter.in
This commit is contained in:
parent
f8737defc6
commit
b98426f907
|
@ -92,7 +92,7 @@ pub struct ExternalDocs {
|
|||
pub struct Parameter {
|
||||
pub name: String,
|
||||
#[serde(rename = "in")]
|
||||
pub _in: String,
|
||||
pub _in: ParameterIn,
|
||||
pub description: Option<String>,
|
||||
pub required: Option<bool>,
|
||||
pub schema: Option<MaybeRef<Schema>>,
|
||||
|
@ -118,6 +118,16 @@ pub struct Parameter {
|
|||
pub multiple_of: Option<u64>,
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize, Debug, PartialEq)]
|
||||
#[serde(rename_all(deserialize = "camelCase"))]
|
||||
pub enum ParameterIn {
|
||||
Path,
|
||||
Query,
|
||||
Header,
|
||||
Body,
|
||||
FormData,
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize, Debug, PartialEq)]
|
||||
#[serde(rename_all(deserialize = "camelCase"))]
|
||||
pub enum ParameterType {
|
||||
|
|
Loading…
Reference in a new issue