Class ValidationErrorsWhitelist
java.lang.Object
com.atlassian.oai.validator.whitelist.ValidationErrorsWhitelist
-
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationErrorsWhitelistcreate()Creates an empty validation whitelist.booleaninthashCode()toString()whitelistedBy(ValidationReport.Message message, ApiOperation operation, Request request, Response response) Returns a whitelist rule that is applicable for the given parameters.withRule(String title, WhitelistRule rule) Creates a new whitelist with all rules of this and with a new rule.
-
Method Details
-
create
Creates an empty validation whitelist. Start with this method when creating a new whitelist from scratch. -
withRule
Creates a new whitelist with all rules of this and with a new rule.- Parameters:
title- A human-readable name of the new rule.rule- A new rule to be added.- Returns:
- A new instance with the added rule.
-
whitelistedBy
public Optional<NamedWhitelistRule> whitelistedBy(ValidationReport.Message message, @Nullable ApiOperation operation, @Nullable Request request, @Nullable Response response) Returns a whitelist rule that is applicable for the given parameters. If a non-empty value is returned then the error message should be whitelisted.- Parameters:
message- report message that can be whitelistedoperation- validated api operationrequest- validated requestresponse- validated response- Returns:
- a rule that matches the arguments, or empty
-
equals
-
hashCode
public int hashCode() -
toString
-