pub struct SchemaAnalyzer { /* private fields */ }Implementations§
Source§impl SchemaAnalyzer
impl SchemaAnalyzer
Sourcepub fn new(openapi_spec: Value) -> Result<Self>
pub fn new(openapi_spec: Value) -> Result<Self>
Construct an analyzer with a default TypeMapper. Pre-Q2.0
callers (tests, simple bins) use this and get bit-identical
behavior to the pre-refactor code.
Sourcepub fn with_type_mapper(
openapi_spec: Value,
type_mapper: TypeMapper,
) -> Result<Self>
pub fn with_type_mapper( openapi_spec: Value, type_mapper: TypeMapper, ) -> Result<Self>
Construct an analyzer with a caller-supplied TypeMapper
(built from GeneratorConfig.types). The CLI / library entry
points use this so user TOML config drives type generation.
Sourcepub fn new_with_extensions(
openapi_spec: Value,
extension_paths: &[PathBuf],
) -> Result<Self>
pub fn new_with_extensions( openapi_spec: Value, extension_paths: &[PathBuf], ) -> Result<Self>
Create a new analyzer with schema extensions merged in (default type mapper).
Sourcepub fn new_with_extensions_and_type_mapper(
openapi_spec: Value,
extension_paths: &[PathBuf],
type_mapper: TypeMapper,
) -> Result<Self>
pub fn new_with_extensions_and_type_mapper( openapi_spec: Value, extension_paths: &[PathBuf], type_mapper: TypeMapper, ) -> Result<Self>
Same as Self::new_with_extensions but with a caller-supplied
type mapper.
Sourcepub fn type_mapper(&self) -> &TypeMapper
pub fn type_mapper(&self) -> &TypeMapper
Borrow the analyzer’s type mapper. Useful for downstream
inspection (e.g. the dep advisory in Q2.8 reads
type_mapper().used_features() after generation).
pub fn analyze(&mut self) -> Result<SchemaAnalysis>
Auto Trait Implementations§
impl !Freeze for SchemaAnalyzer
impl !RefUnwindSafe for SchemaAnalyzer
impl !Sync for SchemaAnalyzer
impl Send for SchemaAnalyzer
impl Unpin for SchemaAnalyzer
impl UnsafeUnpin for SchemaAnalyzer
impl UnwindSafe for SchemaAnalyzer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more