Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
glogger.debug("Read query description: " + description)
method = query_metadata['method'].lower() if 'method' in query_metadata else "get"
if method not in ['get', 'post', 'head', 'put', 'delete', 'options', 'connect']:
method = "get"
pagination = query_metadata['pagination'] if 'pagination' in query_metadata else ""
glogger.debug("Read query pagination: " + str(pagination))
endpoint = query_metadata['endpoint'] if 'endpoint' in query_metadata else ""
glogger.debug("Read query endpoint: " + endpoint)
# If this query allows pagination, add page number as parameter
params = []
if pagination:
params.append(pageUtils.getSwaggerPaginationDef(pagination))
item = packItem('/' + call_name, method, tags, summary, description, params, query_metadata, extraMetadata)
return item