Skip to main content

generate_with

Function generate_with 

Source
pub fn generate_with(
    all: &[ModelMeta],
    base_path: &str,
    style: PaginationStyle,
    schema: Option<PaginationSchema>,
    security_schemes: &[(String, Value)],
    openapi_paths: &[(String, Value)],
) -> GeneratedClient
Expand description

generate_for with the REST config passed explicitly rather than read from umbral-rest’s OnceLocks — the base path, the paginator’s PaginationStyle and (for a custom paginator) its declared PaginationSchema, and the OpenAPI security schemes that drive the client’s auth. Exposure / hidden / filters-enabled are still read from the (gracefully-defaulting) readers.

Tests and the pagination/auth demos drive this so they can exercise every paginator shape and auth scheme without a full App::build (which can only run once per process because the config is process-global).