use of io.apicurio.datamodels.openapi.v3.models.Oas30CallbackPathItem in project apicurio-data-models by Apicurio.
the class Oas30DataModelReader method readCallback.
/**
* Reads an OAS 3.0 Callback object from the given JS data.
* @param json
* @param node
*/
public void readCallback(Object json, Oas30Callback node) {
JsonCompat.keys(json).forEach(name -> {
if (NodeCompat.equals(name, Constants.PROP_$REF)) {
node.$ref = JsonCompat.consumePropertyString(json, name);
} else {
Object pathItem = JsonCompat.consumeProperty(json, name);
Oas30CallbackPathItem pathItemModel = node.createPathItem(name);
this.readPathItem(pathItem, pathItemModel);
node.addPathItem(name, pathItemModel);
}
});
this.readExtensions(json, node);
this.readExtraProperties(json, node);
}
Aggregations