class AnalyzerFlask

Defined in:

analyzer/analyzers/analyzer_flask.cr

Constant Summary

REQUEST_PARAM_FIELD_MAP = {"data" => {["POST", "PUT", "PATCH", "DELETE"], "form"}, "args" => {["GET"], "query"}, "form" => {["POST", "PUT", "PATCH", "DELETE"], "form"}, "files" => {["POST", "PUT", "PATCH", "DELETE"], "form"}, "values" => {["GET", "POST", "PUT", "PATCH", "DELETE"], "query"}, "json" => {["POST", "PUT", "PATCH", "DELETE"], "json"}, "cookie" => {nil, "cookie"}, "headers" => {nil, "header"}}

https://stackoverflow.com/a/16664376 https://tedboy.github.io/flask/generated/generated/flask.Request.html

REQUEST_PARAM_TYPE_MAP = {"query" => nil, "form" => ["POST", "PUT", "PATCH", "DELETE"], "json" => ["POST", "PUT", "PATCH", "DELETE"], "cookie" => nil, "header" => nil}

Instance Method Summary

Instance methods inherited from class AnalyzerPython

find_imported_modules(app_base_path : String, file_path : String, content : String | Nil = nil) : Hash(String, Tuple(String, Int32)) find_imported_modules, find_imported_package(package_path : String, dotted_as_names : String) : Array(Tuple(String, String, Int32)) find_imported_package, find_json_params(codeblock_lines : Array(String), json_variable_names : Array(String)) : Array(Param) find_json_params, parse_function_definition(source_lines : Array(String), start_index : Int) : FunctionDefinition | Nil parse_function_definition, parse_function_or_class(data : String | Array(String), after : Regex | Nil = nil) : String | Nil parse_function_or_class, return_literal_value(data : String) : String return_literal_value

Instance methods inherited from class Analyzer

analyze analyze, base_path : String base_path, logger : NoirLogger logger, result : Array(Endpoint) result, url : String url

Constructor methods inherited from class Analyzer

new(options : Hash(String, String)) new

Macros inherited from class Analyzer

define_getter_methods(names) define_getter_methods

Instance Method Detail

def analyze #

[View source]
def get_endpoints(route_path : String, extra_params : String, codeblock_lines : Array(String), prefix : String) #

[View source]
def get_filtered_params(method : String, params : Array(Param)) #

[View source]