Interface ValidationReport.MessageContext
- Enclosing interface:
- ValidationReport
public static interface ValidationReport.MessageContext
Contextual information about a validation message.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic enumstatic classPointers to the instance being validated and the schema being used for validation -
Method Summary
Modifier and TypeMethodDescriptioncreate()empty()Return a new MessageContext instance that contains all of the data in this context, plus data from the incoming context where that data does not already exist on this context.Optional<io.swagger.v3.oas.models.parameters.RequestBody>Optional<io.swagger.v3.oas.models.responses.ApiResponse>Optional<io.swagger.v3.oas.models.parameters.Parameter>booleanhasData()
-
Method Details
-
empty
-
create
-
from
-
getRequestPath
-
getRequestMethod
Optional<Request.Method> getRequestMethod() -
getApiOperation
Optional<ApiOperation> getApiOperation() -
getApiRequestContentType
-
getApiRequestBodyDefinition
Optional<io.swagger.v3.oas.models.parameters.RequestBody> getApiRequestBodyDefinition() -
getParameter
Optional<io.swagger.v3.oas.models.parameters.Parameter> getParameter() -
getResponseStatus
-
getApiResponseDefinition
Optional<io.swagger.v3.oas.models.responses.ApiResponse> getApiResponseDefinition() -
getLocation
Optional<ValidationReport.MessageContext.Location> getLocation()- Returns:
- Which part of the request/response interaction triggered the failure
-
getAppliedWhitelistRule
Optional<NamedWhitelistRule> getAppliedWhitelistRule()- Returns:
- The whitelist rule applied to the message, if applicable.
-
getPointers
Optional<ValidationReport.MessageContext.Pointers> getPointers()- Returns:
- Pointers to the instance and schema that caused the validation failure, if the failure is from schema validation.
-
hasData
boolean hasData()- Returns:
trueif at least one field on this context object has been set;falseotherwise.
-
enhanceWith
Return a new MessageContext instance that contains all of the data in this context, plus data from the incoming context where that data does not already exist on this context.This is used to build a context up as more information becomes available.
-