Repository navigation
v1.0.0-alpha.3
Pre-release
Pre-release
Added
#[schemars(transform = some::transform)]for applying arbitrary modifications to generated schemas.some::transformmust be an expression of typeschemars::transform::Transform- note that this can be a function with the signaturefn(&mut Schema) -> ().SchemaSettingsandSchemaGeneratorare both nowSend
Changed (⚠️ breaking changes ⚠️ )
visitmodule andVisitortrait have been replace withtransformandTransformrespectively. Accordingly, these items have been renamed:SchemaSettings::visitors->SchemaSettings::transformsSchemaSettings::with_visitor->SchemaSettings::with_transformSchemaGenerator::visitors_mut->SchemaGenerator::transforms_mutGenVisitor->GenTransformVisitor::visit_schema->Transform::transformvisit::visit_schema->transform::transform_subschemas
GenTransformmust also implSend, but no longer needs to implDebug- Doc comments no longer have newlines collapsed when generating the
descriptionproperty (#310)