createParamVar function
Implementation
Expression createParamVar(
BaseParameterAnnotation annotation,
ServerParam param,
) {
if (annotation is! ServerParamAnnotation) {
throw ArgumentError('Invalid annotation type: ${annotation.runtimeType}');
}
final paramsRef = refer(
'context',
).property('request').property('pathParameters');
return paramsRef.index(literalString(annotation.name ?? param.name));
}