use of io.apicurio.datamodels.openapi.v3.models.Oas30Responses in project apicurio-data-models by Apicurio.
the class OasMissingResponseForOperationRule method visitResponses.
/**
* @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitResponses(io.apicurio.datamodels.openapi.models.OasResponses)
*/
@Override
public void visitResponses(OasResponses node) {
Oas30Responses response = (Oas30Responses) node;
this.reportIfInvalid(response.getResponses().size() > 0, node.parent(), null, map());
}
use of io.apicurio.datamodels.openapi.v3.models.Oas30Responses in project apicurio-data-models by Apicurio.
the class Oas20to30TransformationVisitor method visitResponses.
/**
* @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitResponses(io.apicurio.datamodels.openapi.models.OasResponses)
*/
@Override
public void visitResponses(OasResponses node) {
Oas30Operation parent30 = (Oas30Operation) this.lookup(node.parent());
Oas30Responses responses30 = (Oas30Responses) parent30.createResponses();
parent30.responses = responses30;
this.mapNode(node, responses30);
}
use of io.apicurio.datamodels.openapi.v3.models.Oas30Responses in project apicurio-data-models by Apicurio.
the class Oas20to30TransformationVisitor method visitResponse.
/**
* @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitResponse(io.apicurio.datamodels.openapi.models.OasResponse)
*/
@Override
public void visitResponse(OasResponse node) {
Oas30Responses parent30 = (Oas30Responses) this.lookup(node.parent());
Oas30Response response30 = (Oas30Response) parent30.createResponse(node.getStatusCode());
parent30.addResponse(node.getStatusCode(), response30);
response30.$ref = this.updateRef(node.$ref);
this.transformResponse((Oas20Response) node, response30);
this.mapNode(node, response30);
}
Aggregations