Skip to content

Commit 958fff4

Browse files
committed
Make fields of Parameter and Header public
There is no way to use these two struct apart from using their `Default` values otherwise.
1 parent 0979710 commit 958fff4

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/v3_0/schema.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -362,28 +362,28 @@ pub struct Operation {
362362
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Default)]
363363
pub struct Parameter {
364364
/// The name of the parameter.
365-
name: String,
365+
pub name: String,
366366
/// values depend on parameter type
367367
/// may be `header`, `query`, 'path`, `formData`
368368
#[serde(rename = "in")]
369-
location: String,
369+
pub location: String,
370370
#[serde(skip_serializing_if = "Option::is_none")]
371-
required: Option<bool>,
371+
pub required: Option<bool>,
372372
#[serde(skip_serializing_if = "Option::is_none")]
373-
schema: Option<Schema>,
373+
pub schema: Option<Schema>,
374374
#[serde(skip_serializing_if = "Option::is_none")]
375375
#[serde(rename = "uniqueItems")]
376-
unique_items: Option<bool>,
376+
pub unique_items: Option<bool>,
377377
/// string, number, boolean, integer, array, file ( only for formData )
378378
#[serde(skip_serializing_if = "Option::is_none")]
379379
#[serde(rename = "type")]
380-
param_type: Option<String>,
380+
pub param_type: Option<String>,
381381
#[serde(skip_serializing_if = "Option::is_none")]
382-
format: Option<String>,
382+
pub format: Option<String>,
383383
/// A brief description of the parameter. This could contain examples
384384
/// of use. GitHub Flavored Markdown is allowed.
385385
#[serde(skip_serializing_if = "Option::is_none")]
386-
description: Option<String>,
386+
pub description: Option<String>,
387387
// collectionFormat: ???
388388
// default: ???
389389
// maximum ?
@@ -575,22 +575,22 @@ pub struct Header {
575575
// FIXME: Is the third change properly implemented?
576576
// FIXME: Merge `ObjectOrReference<Header>::Reference` and `ParameterOrRef::Reference`
577577
#[serde(skip_serializing_if = "Option::is_none")]
578-
required: Option<bool>,
578+
pub required: Option<bool>,
579579
#[serde(skip_serializing_if = "Option::is_none")]
580-
schema: Option<Schema>,
580+
pub schema: Option<Schema>,
581581
#[serde(skip_serializing_if = "Option::is_none")]
582582
#[serde(rename = "uniqueItems")]
583-
unique_items: Option<bool>,
583+
pub unique_items: Option<bool>,
584584
/// string, number, boolean, integer, array, file ( only for formData )
585585
#[serde(skip_serializing_if = "Option::is_none")]
586586
#[serde(rename = "type")]
587-
param_type: Option<String>,
587+
pub param_type: Option<String>,
588588
#[serde(skip_serializing_if = "Option::is_none")]
589-
format: Option<String>,
589+
pub format: Option<String>,
590590
/// A brief description of the parameter. This could contain examples
591591
/// of use. GitHub Flavored Markdown is allowed.
592592
#[serde(skip_serializing_if = "Option::is_none")]
593-
description: Option<String>,
593+
pub description: Option<String>,
594594
// collectionFormat: ???
595595
// default: ???
596596
// maximum ?

0 commit comments

Comments
 (0)