forked from openapi-generators/openapi-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.py
More file actions
33 lines (26 loc) · 762 Bytes
/
contact.py
File metadata and controls
33 lines (26 loc) · 762 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
32
33
from typing import Optional
from pydantic import AnyUrl, BaseModel
class Contact(BaseModel):
"""
Contact information for the exposed API.
"""
name: Optional[str] = None
"""
The identifying name of the contact person/organization.
"""
url: Optional[AnyUrl] = None
"""
The URL pointing to the contact information.
MUST be in the format of a URL.
"""
email: Optional[str] = None
"""
The email address of the contact person/organization.
MUST be in the format of an email address.
"""
class Config:
schema_extra = {
"examples": [
{"name": "API Support", "url": "http://www.example.com/support", "email": "support@example.com"}
]
}