Initial Version
This commit is contained in:
commit
3046b1ee7b
21 changed files with 491 additions and 0 deletions
support_formatter/models
0
support_formatter/models/__init__.py
Normal file
0
support_formatter/models/__init__.py
Normal file
19
support_formatter/models/interface.py
Normal file
19
support_formatter/models/interface.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from enum import Enum
|
||||
import marshmallow as ma
|
||||
|
||||
class HealthStatus(Enum):
|
||||
OK = 0
|
||||
WARNING = 1
|
||||
ERROR = 2
|
||||
CRITICAL = 3
|
||||
|
||||
class HealthGet(ma.Schema):
|
||||
alive_since = ma.fields.String()
|
||||
alive_for = ma.fields.String()
|
||||
status = ma.fields.Enum(HealthStatus, type=ma.fields.String)
|
||||
|
||||
class ApiVersionGet(ma.Schema):
|
||||
version = ma.fields.String(example="0.1")
|
||||
|
||||
class OpenAPIGet(ma.Schema):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue