openapiv3/license.rs
1use indexmap::IndexMap;
2use serde::{Deserialize, Serialize};
3
4/// License information for the exposed API.
5#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
6pub struct License {
7    /// REQUIRED. The license name used for the API.
8    pub name: String,
9    /// A URL to the license used for the API. MUST be in the format of a URL.
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub url: Option<String>,
12    /// Inline extensions to this object.
13    #[serde(flatten, deserialize_with = "crate::util::deserialize_extensions")]
14    pub extensions: IndexMap<String, serde_json::Value>,
15}