use of io.apicurio.datamodels.openapi.v3.models.Oas30Schema.Oas30ItemsSchema in project apicurio-data-models by Apicurio.
the class Oas20to30TransformationVisitor method visitItemsSchema.
/**
* @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitItemsSchema(io.apicurio.datamodels.openapi.models.OasSchema)
*/
@Override
public void visitItemsSchema(OasSchema node) {
Oas30Schema parent30 = (Oas30Schema) this.lookup(node.parent());
Oas30ItemsSchema items30 = (Oas30ItemsSchema) parent30.createItemsSchema();
if (!NodeCompat.isNullOrUndefined(parent30.items) && NodeCompat.isNode(parent30.items)) {
List<Oas30ItemsSchema> items = new ArrayList<>();
items.add(items30);
parent30.items = items;
} else {
parent30.items = items30;
}
this.toSchema(node, items30, true);
this.mapNode(node, items30);
}
use of io.apicurio.datamodels.openapi.v3.models.Oas30Schema.Oas30ItemsSchema in project apicurio-data-models by Apicurio.
the class Oas20to30TransformationVisitor method visitItems.
/**
* @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitItems(io.apicurio.datamodels.openapi.v2.models.Oas20Items)
*/
@Override
public void visitItems(Oas20Items node) {
Oas30Schema parent30 = this.findItemsParent(node);
Oas30ItemsSchema items30 = (Oas30ItemsSchema) parent30.createItemsSchema();
parent30.items = items30;
this.toSchema(node, items30, false);
this.mapNode(node, items30);
}
Aggregations