Skip to main content

Module backend_generator

Module backend_generator 

Source
Expand description

Backend code generation utilities

This module provides shared utilities for generating backend server code from OpenAPI specifications. These utilities can be used by backend generator plugins to extract routes, convert schemas, and generate common patterns.

Structs§

QueryParamInfo
Query parameter information
ResponseInfo
Response information
RouteInfo
Information about a route extracted from OpenAPI spec

Functions§

extract_path_parameters
Extract path parameters from an OpenAPI path string
extract_routes
Extract all routes from an OpenAPI specification
extract_schemas
Get all schemas from OpenAPI components
generate_handler_name
Generate a handler function name from route information
sanitize_name
Sanitize a name for use in Rust identifiers
schema_to_rust_type
Convert OpenAPI schema type to a Rust type name
to_pascal_case
Convert a string to PascalCase
to_snake_case
Convert a string to snake_case