mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
add structured output support
This commit is contained in:
@@ -13,6 +13,7 @@ from hyperglass.models import HyperglassModel
|
||||
class ParsedRouteEntry(HyperglassModel):
|
||||
"""Per-Route Response Model."""
|
||||
|
||||
prefix: StrictStr
|
||||
active: StrictBool
|
||||
age: StrictInt
|
||||
weight: StrictInt
|
||||
@@ -31,7 +32,6 @@ class ParsedRoutes(HyperglassModel):
|
||||
"""Parsed Response Model."""
|
||||
|
||||
vrf: StrictStr
|
||||
prefix: StrictStr
|
||||
count: StrictInt = 0
|
||||
routes: List[ParsedRouteEntry]
|
||||
winning_weight: constr(regex=r"(low|high)")
|
||||
|
Reference in New Issue
Block a user