pub struct SchemaAnalysis {
pub schemas: BTreeMap<String, AnalyzedSchema>,
pub dependencies: DependencyGraph,
pub patterns: DetectedPatterns,
pub operations: BTreeMap<String, OperationInfo>,
pub operation_responses: BTreeMap<String, BTreeMap<String, OperationResponse>>,
pub operation_id_aliases: BTreeMap<String, Vec<String>>,
pub used_type_features: UsedFeatures,
pub enum_extensions: BTreeMap<String, EnumExtensions>,
pub validation_context: ValidationContext,
pub untagged_union_branches: BTreeSet<String>,
}Fields§
§schemas: BTreeMap<String, AnalyzedSchema>All schemas indexed by name
dependencies: DependencyGraphDependency graph for generation ordering
patterns: DetectedPatternsDetected patterns and transformations
operations: BTreeMap<String, OperationInfo>OpenAPI operations and their request/response schemas
operation_responses: BTreeMap<String, BTreeMap<String, OperationResponse>>Complete response contracts by emitted operation ID and response key.
Unlike OperationInfo::response_schemas, this retains responses with
no body as well as their selected JSON media type and SSE declaration.
operation_id_aliases: BTreeMap<String, Vec<String>>Source operationId to emitted operation IDs. Duplicate or Rust-identifier-colliding IDs are renamed during analysis; retaining this mapping lets selector resolution report ambiguity or renaming.
used_type_features: UsedFeaturesOptional crates the TypeMapper was asked to reference
during analysis (e.g. chrono when a format: date-time field
became chrono::DateTime<Utc>). The generator reads this to
decide which helper modules (e.g. base64_serde) to emit. Complete
dependency reporting is collected from retained emitted files so
pruned schemas cannot leak stale requirements.
enum_extensions: BTreeMap<String, EnumExtensions>Q2.6: per-schema vendor enum extensions
(x-enum-varnames / x-enum-descriptions). Populated during
analysis when a StringEnum / ExtensibleEnum schema declares
either extension; the generator uses these to override the
default heuristic variant names and emit per-variant doc
comments. Indexed by analyzed-schema name. Side-channel so we
don’t have to touch every StringEnum constructor.
validation_context: ValidationContextRaw, unpruned schema material used to build offline server validators.
This is deliberately independent of schemas, which model pruning may
mutate before server artifacts are emitted.
untagged_union_branches: BTreeSet<String>Schemas reachable as a branch of an untagged union.
#[serde(untagged)] tries branches in order and takes the first that
deserializes, so a branch that accepts more than its schema allows
claims values belonging to a later branch. A struct in this set whose
document states additionalProperties: false must therefore reject
undeclared keys; elsewhere leniency costs nothing and keeps generated
clients working when a server adds a field.
Populated at the end of SchemaAnalyzer::analyze, after inline
branch schemas exist. Side-channel keyed by analyzed-schema name so no
object constructor has to carry it.
Implementations§
Source§impl SchemaAnalysis
impl SchemaAnalysis
Sourcepub fn untyped_fields(&self) -> Vec<UntypedFinding>
pub fn untyped_fields(&self) -> Vec<UntypedFinding>
Every generated field that carries serde_json::Value, with the reason.
Derived from the analyzed types rather than recorded as analysis runs, so the count tracks generated output: a schema referenced by fifty properties contributes fifty findings, and a pruned one contributes none.
Trait Implementations§
Source§impl Clone for SchemaAnalysis
impl Clone for SchemaAnalysis
Source§fn clone(&self) -> SchemaAnalysis
fn clone(&self) -> SchemaAnalysis
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more