openapiv3/info.rs
1use crate::*;
2use indexmap::IndexMap;
3use serde::{Deserialize, Serialize};
4
5/// The object provides metadata about the API.
6/// The metadata MAY be used by the clients if needed,
7/// and MAY be presented in editing or documentation generation tools for convenience.
8#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
9pub struct Info {
10 /// REQUIRED. The title of the application.
11 pub title: String,
12 /// A short description of the application.
13 /// CommonMark syntax MAY be used for rich text representation.
14 #[serde(skip_serializing_if = "Option::is_none")]
15 pub description: Option<String>,
16 /// A URL to the Terms of Service for the API.
17 /// MUST be in the format of a URL.
18 #[serde(rename = "termsOfService", skip_serializing_if = "Option::is_none")]
19 pub terms_of_service: Option<String>,
20 /// The contact information for the exposed API.
21 #[serde(skip_serializing_if = "Option::is_none")]
22 pub contact: Option<Contact>,
23 /// The license information for the exposed API.
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub license: Option<License>,
26 /// REQUIRED. The version of the OpenAPI document (which is distinct from
27 /// the OpenAPI Specification version or the API implementation version).
28 pub version: String,
29 /// Inline extensions to this object.
30 #[serde(flatten, deserialize_with = "crate::util::deserialize_extensions")]
31 pub extensions: IndexMap<String, serde_json::Value>,
32}