Skip to content

Commit

Permalink
Merge pull request #24 from fredszaq/master
Browse files Browse the repository at this point in the history
Make fields of `Parameter` and `Header` public
  • Loading branch information
softprops authored Apr 27, 2019
2 parents 0979710 + 958fff4 commit c4f4706
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/v3_0/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,28 +362,28 @@ pub struct Operation {
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Default)]
pub struct Parameter {
/// The name of the parameter.
name: String,
pub name: String,
/// values depend on parameter type
/// may be `header`, `query`, 'path`, `formData`
#[serde(rename = "in")]
location: String,
pub location: String,
#[serde(skip_serializing_if = "Option::is_none")]
required: Option<bool>,
pub required: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
schema: Option<Schema>,
pub schema: Option<Schema>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(rename = "uniqueItems")]
unique_items: Option<bool>,
pub unique_items: Option<bool>,
/// string, number, boolean, integer, array, file ( only for formData )
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(rename = "type")]
param_type: Option<String>,
pub param_type: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
format: Option<String>,
pub format: Option<String>,
/// A brief description of the parameter. This could contain examples
/// of use. GitHub Flavored Markdown is allowed.
#[serde(skip_serializing_if = "Option::is_none")]
description: Option<String>,
pub description: Option<String>,
// collectionFormat: ???
// default: ???
// maximum ?
Expand Down Expand Up @@ -575,22 +575,22 @@ pub struct Header {
// FIXME: Is the third change properly implemented?
// FIXME: Merge `ObjectOrReference<Header>::Reference` and `ParameterOrRef::Reference`
#[serde(skip_serializing_if = "Option::is_none")]
required: Option<bool>,
pub required: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
schema: Option<Schema>,
pub schema: Option<Schema>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(rename = "uniqueItems")]
unique_items: Option<bool>,
pub unique_items: Option<bool>,
/// string, number, boolean, integer, array, file ( only for formData )
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(rename = "type")]
param_type: Option<String>,
pub param_type: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
format: Option<String>,
pub format: Option<String>,
/// A brief description of the parameter. This could contain examples
/// of use. GitHub Flavored Markdown is allowed.
#[serde(skip_serializing_if = "Option::is_none")]
description: Option<String>,
pub description: Option<String>,
// collectionFormat: ???
// default: ???
// maximum ?
Expand Down

0 comments on commit c4f4706

Please sign in to comment.