Module generation

Module generation 

Source
Expand description

Route generation from OpenAPI specifications

This module handles the generation of routes from OpenAPI specifications, including parameter extraction, path matching, and route creation.

Functionsยง

convert_path_to_axum_format
Convert OpenAPI path parameters to Axum path format
extract_path_parameters
Extract path parameters from an OpenAPI path template
generate_mock_response_code
Generate mock response generation code
generate_parameter_extraction_code
Generate parameter extraction code for a route
generate_parameter_validation_code
Generate validation code for route parameters
generate_route_key
Generate a unique route key for caching/routing purposes
generate_routes_from_spec
Generate routes from an OpenAPI specification
route_matches_pattern
Check if a route path matches a pattern (for routing purposes)
validate_path_parameters
Validate that path parameters match between template and actual path