Skip to content

Commit 0e74479

Browse files
committed
add comment
1 parent ae6794b commit 0e74479

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,11 @@ def netbox_search_objects(
498498

499499
return results
500500

501-
def _endpoint_for_type(object_type):
501+
def _endpoint_for_type(object_type: str) -> str:
502+
"""
503+
Returns partial API endpoint prefix for the given object type.
504+
e.g., "dcim.device" -> "dcim/devices"
505+
"""
502506
return NETBOX_OBJECT_TYPES[object_type]['endpoint']
503507

504508
if __name__ == "__main__":

0 commit comments

Comments
 (0)