Function ros2_medkit_gateway::extract_entity_type_from_path

Function Documentation

inline SovdEntityType ros2_medkit_gateway::extract_entity_type_from_path(const std::string &path)

Extract expected entity type from request path.

Parses the URL path to determine which entity type the route expects. Used for semantic validation - ensuring /components/{id} only accepts component IDs, not app IDs.

Parameters:

path – Request path (e.g., “/api/v1/components/my_component/data”)

Returns:

Expected entity type, or UNKNOWN if path doesn’t match entity routes