Module extractor

Module extractor 

Source
Expand description

Route extraction module for parsing web framework route definitions.

This module provides a unified interface for extracting route information from different web frameworks. Each framework has its own extractor implementation that knows how to parse framework-specific route definitions.

§Supported Frameworks

§Example

use openapi_from_source::extractor::{RouteExtractor, axum::AxumExtractor};
use openapi_from_source::parser::AstParser;
use std::path::Path;

let parsed = AstParser::parse_file(Path::new("src/main.rs")).unwrap();
let extractor = AxumExtractor;
let routes = extractor.extract_routes(&[parsed]);
println!("Found {} routes", routes.len());

Modules§

actix
axum

Structs§

Parameter
Information about a single parameter in a route handler.
RouteInfo
Complete information about a single API endpoint.
TypeInfo
Type information extracted from Rust code for OpenAPI schema generation.

Enums§

HttpMethod
HTTP methods supported by route extractors.
ParameterLocation
The location where a parameter value is extracted from in an HTTP request.

Traits§

RouteExtractor
Trait for extracting route information from parsed Rust files.