v1.0.0-alpha.3
Pre-release
Pre-release
Added
#[schemars(transform = some::transform)]
for applying arbitrary modifications to generated schemas.some::transform
must be an expression of typeschemars::transform::Transform
- note that this can be a function with the signaturefn(&mut Schema) -> ()
.SchemaSettings
andSchemaGenerator
are both nowSend
Changed (⚠️ breaking changes ⚠️ )
visit
module andVisitor
trait have been replace withtransform
andTransform
respectively. Accordingly, these items have been renamed:SchemaSettings::visitors
->SchemaSettings::transforms
SchemaSettings::with_visitor
->SchemaSettings::with_transform
SchemaGenerator::visitors_mut
->SchemaGenerator::transforms_mut
GenVisitor
->GenTransform
Visitor::visit_schema
->Transform::transform
visit::visit_schema
->transform::transform_subschemas
GenTransform
must also implSend
, but no longer needs to implDebug
- Doc comments no longer have newlines collapsed when generating the
description
property (#310)