2020-01-21 02:38:04 -07:00
|
|
|
"""Configuration for API docs feature."""
|
2020-01-20 10:19:27 -07:00
|
|
|
# Third Party Imports
|
|
|
|
from pydantic import StrictBool
|
2020-01-21 02:38:04 -07:00
|
|
|
from pydantic import StrictStr
|
2020-01-20 10:19:27 -07:00
|
|
|
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"
|
2020-01-21 02:38:04 -07:00
|
|
|
endpoint_summary: StrictStr = "Query Endpoint"
|
|
|
|
endpoint_description: StrictStr = "Request a query response per-location."
|
|
|
|
group_title: StrictStr = "Queries"
|