openapiv3/
contact.rs

1use indexmap::IndexMap;
2use serde::{Deserialize, Serialize};
3
4/// Contact information for the exposed API.
5#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
6pub struct Contact {
7    /// The identifying name of the contact person/organization.
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub name: Option<String>,
10    /// The URL pointing to the contact information.
11    /// MUST be in the format of a URL.
12    #[serde(skip_serializing_if = "Option::is_none")]
13    pub url: Option<String>,
14    /// The email address of the contact person/organization.
15    /// MUST be in the format of an email address.
16    #[serde(skip_serializing_if = "Option::is_none")]
17    pub email: Option<String>,
18    /// Inline extensions to this object.
19    #[serde(flatten, deserialize_with = "crate::util::deserialize_extensions")]
20    pub extensions: IndexMap<String, serde_json::Value>,
21}