-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathserver_variable.rs
24 lines (23 loc) · 1.04 KB
/
server_variable.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
/// An object representing a Server Variable
/// for server URL template substitution.
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
pub struct ServerVariable {
/// An enumeration of string values to be
/// used if the substitution options are from a limited set.
#[serde(default, rename = "enum", skip_serializing_if = "Vec::is_empty")]
pub enumeration: Vec<String>,
/// REQUIRED. The default value to use for substitution,
/// and to send, if an alternate value is not supplied.
/// Unlike the Schema Object's default, this value MUST
/// be provided by the consumer.
pub default: String,
/// An optional description for the server
/// variable. CommonMark syntax MAY be used
/// for rich text representation.
pub description: Option<String>,
/// Inline extensions to this object.
#[serde(flatten, deserialize_with = "crate::util::deserialize_extensions")]
pub extensions: IndexMap<String, serde_json::Value>,
}