original_docstring: 
      Extract Flask-style parameters from an URL pattern as Swagger ones.
      
docstring: Extract Flask-style parameters from an URL pattern as Swagger ones.
docstring_tokens: Extract Flask - style parameters from an URL pattern as Swagger ones .
code: def extract_path_params(path):
      '''
      Extract Flask-style parameters from an URL pattern as Swagger ones.
      '''
      params = []
      for match in RE_PARAMS.findall(path):
          descriptor, name = match.split(':') if ':' in match else (None, match)
          param = {
              'name': name,
              'paramType': 'path',
              'required': True
          }
  
          if descriptor in mappings.PATH_TYPES:
              param['type'] = mappings.PATH_TYPES[descriptor]
          elif descriptor in current_app.url_map.converters:
              param['type'] = 'string'
          else:
              raise ValueError('Unsupported type converter')
          params.append(param)
      return params
code_tokens: def extract_path_params ( path ) : params = [ ] for match in RE_PARAMS . findall ( path ) : descriptor , name = match . split ( ':' ) if ':' in match else ( None , match ) param = { 'name' : name , 'paramType' : 'path' , 'required' : True } if descriptor in mappings . PATH_TYPES : param [ 'type' ] = mappings . PATH_TYPES [ descriptor ] elif descriptor in current_app . url_map . converters : param [ 'type' ] = 'string' else : raise ValueError ( 'Unsupported type converter' ) params . append ( param ) return params
short_docstring: Extract Flask-style parameters from an URL pattern as Swagger ones.
short_docstring_tokens: Extract Flask - style parameters from an URL pattern as Swagger ones .
comment: '''
      Extract Flask-style parameters from an URL pattern as Swagger ones.
      '''