mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-09 03:31:51 -07:00
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:
@@ -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[
|
||||
|
||||
Reference in New Issue
Block a user