openapiv3/
tag.rs

1use crate::*;
2use indexmap::IndexMap;
3use serde::{Deserialize, Serialize};
4
5/// Adds metadata to a single tag that is used by the
6/// Operation Object. It is not mandatory to have a
7/// Tag Object per tag defined in the Operation Object instances.
8#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
9pub struct Tag {
10    /// REQUIRED. The name of the tag.
11    pub name: String,
12    /// A short description for the tag.
13    /// CommonMark syntax MAY be used for rich text representation.
14    #[serde(skip_serializing_if = "Option::is_none")]
15    pub description: Option<String>,
16    /// Additional external documentation for this tag.
17    #[serde(rename = "externalDocs", skip_serializing_if = "Option::is_none")]
18    pub external_docs: Option<ExternalDocumentation>,
19    /// Inline extensions to this object.
20    #[serde(flatten, deserialize_with = "crate::util::deserialize_extensions")]
21    pub extensions: IndexMap<String, serde_json::Value>,
22}