class Analyzer::Python::FastAPI

Defined in:

analyzer/analyzers/python/fastapi.cr

Instance Method Summary

Instance methods inherited from class Analyzer::Python::Python

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_var_names : Array(String)) : Array(Param) find_json_params, parse_code_block(data : String | Array(String), after : Regex | Nil = nil) : String | Nil parse_code_block, parse_function_def(source_lines : Array(String), start_index : Int32) : FunctionDefinition | Nil parse_function_def, 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, YAML::Any)) new

Macros inherited from class Analyzer

define_getter_methods(names) define_getter_methods

Instance Method Detail

def analyze #

[View source]
def configure_router_prefix(file : String, include_router_map : Hash(String, Hash(String, Router)), router_prefix : String = "") #

Configures the prefix for each router


[View source]
def find_base_model_params(source : String, class_name : String, param_name : String) : Array(Param) #

Finds the parameters for a base model class


[View source]
def find_dictionary_params(source : String, param : FunctionParameter) : Array(Param) #

Finds parameters in dictionary structures


[View source]
def infer_parameter_type(data : String, is_param_type = false) : String | Nil #

Infers the type of the parameter based on its default value or type annotation


[View source]