original_docstring: Extract Swagger parameters from a RequestParser
docstring: Extract Swagger parameters from a RequestParser
docstring_tokens: Extract Swagger parameters from a RequestParser
code: def parser_to_params(parser):
      '''Extract Swagger parameters from a RequestParser'''
      params = {}
      for arg in parser.args:
          if arg.location == 'cookie':
              continue
          param = {'paramType': mappings.LOCATIONS.get(arg.location, 'query')}
          _handle_arg_type(arg, param)
          if arg.required:
              param['required'] = True
          if arg.help:
              param['description'] = arg.help
          if arg.default:
              param['defaultValue'] = arg.default
          if arg.action == 'append':
              param['allowMultiple'] = True
          if arg.choices:
              param['enum'] = arg.choices
          # if param['paramType'] == 'body':
          #     params['body'] = param
          # else:
          params[arg.name] = param
      return params
code_tokens: def parser_to_params ( parser ) : params = { } for arg in parser . args : if arg . location == 'cookie' : continue param = { 'paramType' : mappings . LOCATIONS . get ( arg . location , 'query' ) } _handle_arg_type ( arg , param ) if arg . required : param [ 'required' ] = True if arg . help : param [ 'description' ] = arg . help if arg . default : param [ 'defaultValue' ] = arg . default if arg . action == 'append' : param [ 'allowMultiple' ] = True if arg . choices : param [ 'enum' ] = arg . choices params [ arg . name ] = param return params
short_docstring: Extract Swagger parameters from a RequestParser
short_docstring_tokens: Extract Swagger parameters from a RequestParser
comment: '''Extract Swagger parameters from a RequestParser'''$SEP$# if param['paramType'] == 'body':$SEP$#     params['body'] = param$SEP$# else: