forked from openapi-generators/openapi-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtag.py
More file actions
31 lines (23 loc) · 839 Bytes
/
tag.py
File metadata and controls
31 lines (23 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from typing import Optional
from pydantic import BaseModel
from .external_documentation import ExternalDocumentation
class Tag(BaseModel):
"""
Adds metadata to a single tag that is used by the [Operation Object](#operationObject).
It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
"""
name: str
"""
**REQUIRED**. The name of the tag.
"""
description: Optional[str] = None
"""
A short description for the tag.
[CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
"""
externalDocs: Optional[ExternalDocumentation] = None
"""
Additional external documentation for this tag.
"""
class Config:
schema_extra = {"examples": [{"name": "pet", "description": "Pets operations"}]}