use of io.apicurio.datamodels.openapi.visitors.transform.Oas20to30TransformationVisitor in project apicurio-data-models by Apicurio.
the class Library method transformDocument.
/**
* Transforms from an OpenAPI 2.0 document into a 3.0 document.
* @param source
*/
public static Oas30Document transformDocument(Oas20Document source) {
Oas20Document clone = (Oas20Document) cloneDocument(source);
Oas20to30TransformationVisitor transformer = new Oas20to30TransformationVisitor();
VisitorUtil.visitTree(clone, transformer, TraverserDirection.down);
return transformer.getResult();
}
Aggregations