code: def generate_path_validator(api_path, path_definition, parameters,
                              context, **kwargs):
      
      path_level_parameters = dereference_parameter_list(
          path_definition.get('parameters', []),
          context,
      )
      operation_level_parameters = dereference_parameter_list(
          parameters,
          context,
      )
  
      all_parameters = merge_parameter_lists(
          path_level_parameters,
          operation_level_parameters,
      )
  
      # PATH
      in_path_parameters = filter_parameters(all_parameters, in_=PATH)
      return chain_reduce_partial(
          attrgetter('path'),
          generate_path_parameters_validator(api_path, in_path_parameters, context),
      )
docs: Generates a callable for validating the parameters in a response object.