File tree Expand file tree Collapse file tree
features/step_definitions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,6 +238,25 @@ def build_given(api_version, operation)
238238 result
239239 end if operation [ "parameters" ]
240240
241+ # Store path parameters for undo operations
242+ # Path parameters are required positional parameters that are not the body
243+ if operation [ "parameters" ] && args
244+ required_params = method . parameters . select { |p | p [ 0 ] == :req }
245+
246+ operation [ "parameters" ] . each_with_index do |p , index |
247+ # Only store if:
248+ # 1. Index is within required params range
249+ # 2. Parameter is not named "body" (body is required but not a path param)
250+ if index < required_params . length && p [ "name" ] != "body"
251+ param_value = args [ index ]
252+ # Store with all naming variants for compatibility with undo lookup
253+ path_parameters [ p [ "name" ] ] = param_value
254+ path_parameters [ p [ "name" ] . to_parameter ] = param_value
255+ path_parameters [ p [ "name" ] . to_parameter . to_sym ] = param_value
256+ end
257+ end
258+ end
259+
241260 result = method . call ( *args ) [ 0 ]
242261
243262 # register undo method
You can’t perform that action at this time.
0 commit comments