Skip to main content

OpenApiRegistry

Trait OpenApiRegistry 

Source
pub trait OpenApiRegistry: Send + Sync {
    // Required methods
    fn register_operation(&self, spec: &OperationSpec);
    fn ensure_schema_raw(
        &self,
        name: &str,
        schemas: Vec<(String, RefOr<Schema>)>,
    ) -> String;
    fn as_any(&self) -> &dyn Any;
}
Expand description

OpenAPI registry trait for operation and schema registration

Required Methods§

Source

fn register_operation(&self, spec: &OperationSpec)

Register an API operation specification

Source

fn ensure_schema_raw( &self, name: &str, schemas: Vec<(String, RefOr<Schema>)>, ) -> String

Ensure schema for a type (including transitive dependencies) is registered under components and return the canonical component name for $ref. This is a type-erased version for dyn compatibility.

Source

fn as_any(&self) -> &dyn Any

Downcast support for accessing the concrete implementation if needed.

Implementors§