Enhance API documentation and schemas: add new device field locking/unlocking endpoints and expand allowed column names for updates #1598

This commit is contained in:
Jokob @NetAlertX
2026-04-08 21:57:58 +00:00
parent bda8ca3bd8
commit b530a6e635
2 changed files with 143 additions and 2 deletions

View File

@@ -33,9 +33,19 @@ COLUMN_NAME_PATTERN = re.compile(r"^[a-zA-Z0-9_]+$")
# Security whitelists & Literals for documentation
ALLOWED_DEVICE_COLUMNS = Literal[
# Main Info
"devName", "devOwner", "devType", "devVendor",
"devGroup", "devLocation", "devComments", "devFavorite",
"devParentMAC", "devCanSleep"
"devGroup", "devLocation", "devComments", "devIcon",
# Alerts & Behavior
"devFavorite", "devAlertEvents", "devAlertDown",
"devCanSleep", "devSkipRepeated", "devReqNicsOnline", "devForceStatus",
# Network topology
"devParentMAC", "devParentPort", "devParentRelType",
"devSSID", "devSite", "devVlan",
# Display / Status
"devStaticIP", "devIsNew", "devIsArchived",
# Custom properties
"devCustomProps",
]
ALLOWED_NMAP_MODES = Literal[