forked from mirrors/thatmattlove-hyperglass
add fastapi docs config model
This commit is contained in:
parent
cd161e1ca3
commit
20abd74de8
1 changed files with 15 additions and 0 deletions
15
hyperglass/configuration/models/docs.py
Normal file
15
hyperglass/configuration/models/docs.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Third Party Imports
|
||||
from pydantic import StrictBool
|
||||
from pydantic import constr
|
||||
|
||||
# Project Imports
|
||||
from hyperglass.configuration.models._utils import AnyUri
|
||||
from hyperglass.configuration.models._utils import HyperglassModel
|
||||
|
||||
|
||||
class Docs(HyperglassModel):
|
||||
"""Validation model for params.general.docs."""
|
||||
|
||||
enable: StrictBool = True
|
||||
mode: constr(regex=r"(swagger|redoc)") = "swagger"
|
||||
uri: AnyUri = "/docs"
|
||||
Loading…
Add table
Reference in a new issue