toShelfPath function
Converts an OpenAPI-style path like /users/{id} to the
shelf_router-style path /users/<id>.
Implementation
String toShelfPath(String path) {
return path.replaceAllMapped(
RegExp(r'\{([a-zA-Z_][a-zA-Z0-9_]*)\}'),
(m) => '<${m.group(1)}>',
);
}