sw4rm_rs/shared/
external_documentation.rs

1use std::collections::HashMap;
2use serde::{Deserialize, Serialize};
3use serde_json::Value;
4
5/// External Documentation Object
6///
7/// Allows referencing an external resource for extended documentation.
8#[derive(Debug, Serialize, Deserialize, Default, Clone, PartialEq)]
9#[serde(default, rename_all = "camelCase")]
10pub struct ExternalDocumentation {
11    /// A short description of the target documentation. GFM syntax can be used for rich text
12    /// representation.
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub description: Option<String>,
15    /// Required. The URL for the target documentation. Value MUST be in the format of a URL.
16    pub url: String,
17
18    /// Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example,
19    /// x-internal-id. The value can be null, a primitive, an array or an object. See Vendor
20    /// Extensions for further details.
21    #[serde(flatten, skip_serializing_if = "HashMap::is_empty")]
22    pub x_fields: HashMap<String, Value>,
23}