Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-548

Add operation parameters type check

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Remote client
    • Backlog priority:
      500

      Description

      Implement TODO in:

          def _check_params(self, command, params):
              method = self._check_operation(command)
              required_params = []
              other_params = []
              for param in method['params']:
                  if param['required']:
                      required_params.append(param['name'])
                  else:
                      other_params.append(param['name'])
      
              for param in params.keys():
                  if (not param in required_params
                      and not param in other_params):
                      log.trace("Unexpected param '%s' for operation '%s'", param,
                                  command)
              for param in required_params:
                  if not param in params:
                      raise ValueError(
                          "Missing required param '%s' for operation '%s'" % (
                              param, command))
      
              # TODO: add typechecking
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 minutes
                2m