Index

A B C D E F G H I M N O P R S T U V 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

allowedMethods() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.MethodNotAllowed
Returns the value of the allowedMethods record component.
and(ValidationReport) - Method in record class ch.nexsol.gateway.validation.ValidationReport
Returns a report holding the violations of both reports.
apply(OpenapiValidationGatewayFilterFactory.Config) - Method in class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory
Builds the filter validating the exchange against the configured contract.

B

BODIES_SKIPPED - Static variable in class ch.nexsol.gateway.validation.ValidationMetrics
Counter of the bodies that were forwarded without being validated, tagged by the reason.
bodySkipped(String, String, ValidationMetrics.SkipReason) - Method in class ch.nexsol.gateway.validation.ValidationMetrics
Counts one body that was forwarded without being validated.

C

ch.nexsol.gateway.validation - package ch.nexsol.gateway.validation
 
ch.nexsol.gateway.validation.autoconfigure - package ch.nexsol.gateway.validation.autoconfigure
 
ch.nexsol.gateway.validation.factory - package ch.nexsol.gateway.validation.factory
 
compiledSchema(String, Schema) - Method in class ch.nexsol.gateway.validation.OpenapiContract
Returns the compiled JSON schema of the given contract schema, compiling it on first use.
Config() - Constructor for class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory.Config
 
contract(String) - Method in class ch.nexsol.gateway.validation.OpenapiContractRegistry
Returns the contract at the given location, reading it on first use.
CONTRACTS_UNAVAILABLE - Static variable in class ch.nexsol.gateway.validation.ValidationMetrics
Counter of the exchanges forwarded without validation because their contract could not be read.
contractUnavailable(String) - Method in class ch.nexsol.gateway.validation.ValidationMetrics
Counts one exchange forwarded because its contract could not be read.

D

describe() - Method in record class ch.nexsol.gateway.validation.ValidationReport
Renders the violations as a single line, suitable for a log message or an audit attribute.
Direction() - Constructor for class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
 

E

empty() - Static method in record class ch.nexsol.gateway.validation.ValidationReport
Returns the report of a message that honours its contract.
ENCODED - Enum constant in enum class ch.nexsol.gateway.validation.ValidationMetrics.SkipReason
The body is compressed, and decompressing it to validate it is out of scope.
ENFORCE - Enum constant in enum class ch.nexsol.gateway.validation.ValidationMode
Validate and reject a message that breaks the contract: 400 Bad Request for a request, 502 Bad Gateway for a response.
equals(Object) - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.Found
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.MethodNotAllowed
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.PathNotFound
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class ch.nexsol.gateway.validation.ValidationReport
Indicates whether some other object is "equal to" this one.
errors() - Method in record class ch.nexsol.gateway.validation.ValidationReport
Returns the value of the errors record component.

F

Found(String, Operation, List, Map) - Constructor for record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.Found
Creates an instance of a Found record class.

G

getMaxBodySize() - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
 
getMode() - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
 
getPathPrefix() - Method in class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory.Config
 
getRequest() - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties
 
getResponse() - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties
 
getSpecUrl() - Method in class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory.Config
 

H

hashCode() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.Found
Returns a hash code value for this object.
hashCode() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.MethodNotAllowed
Returns a hash code value for this object.
hashCode() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.PathNotFound
Returns a hash code value for this object.
hashCode() - Method in record class ch.nexsol.gateway.validation.ValidationReport
Returns a hash code value for this object.

I

isActive() - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
Returns whether this direction is validated at all.
isEnforced() - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
Returns whether a message breaking the contract is rejected.
isJson(MediaType) - Static method in class ch.nexsol.gateway.validation.ValidationMediaTypes
Returns whether a body of this media type can be validated against a JSON schema.
isValid() - Method in record class ch.nexsol.gateway.validation.ValidationReport
Returns whether the message honours its contract.
isValidateBody() - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
 

M

MethodNotAllowed(String, Set) - Constructor for record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.MethodNotAllowed
Creates an instance of a MethodNotAllowed record class.

N

NOT_JSON - Enum constant in enum class ch.nexsol.gateway.validation.ValidationMetrics.SkipReason
The media type carries nothing a JSON schema applies to: an upload, a binary stream, a form submission.

O

of(String...) - Static method in record class ch.nexsol.gateway.validation.ValidationReport
Returns a report holding the given violations.
OFF - Enum constant in enum class ch.nexsol.gateway.validation.ValidationMode
Do not validate this direction at all.
OpenapiContract - Class in ch.nexsol.gateway.validation
A parsed OpenAPI document, ready to validate an exchange against.
OpenapiContract(OpenAPI) - Constructor for class ch.nexsol.gateway.validation.OpenapiContract
Creates a contract from a parsed document.
OpenapiContract.Resolution - Interface in ch.nexsol.gateway.validation
What the contract has to say about a request path and method.
OpenapiContract.Resolution.Found - Record Class in ch.nexsol.gateway.validation
The contract declares the operation.
OpenapiContract.Resolution.MethodNotAllowed - Record Class in ch.nexsol.gateway.validation
The contract declares the path but not for this method.
OpenapiContract.Resolution.PathNotFound - Record Class in ch.nexsol.gateway.validation
The contract declares no path matching the request.
OpenapiContractException - Exception Class in ch.nexsol.gateway.validation
Thrown when an OpenAPI contract cannot be read or parsed.
OpenapiContractException(String) - Constructor for exception class ch.nexsol.gateway.validation.OpenapiContractException
Creates the exception.
OpenapiContractException(String, Throwable) - Constructor for exception class ch.nexsol.gateway.validation.OpenapiContractException
Creates the exception.
OpenapiContractRegistry - Class in ch.nexsol.gateway.validation
Reads the OpenAPI contracts the filter validates against, and keeps each one for as long as the gateway runs.
OpenapiContractRegistry(ResourceLoader) - Constructor for class ch.nexsol.gateway.validation.OpenapiContractRegistry
Creates the registry.
OpenapiRequestValidator - Class in ch.nexsol.gateway.validation
Validates a request against the operation the contract resolved for it: its parameters first, then its body.
OpenapiRequestValidator() - Constructor for class ch.nexsol.gateway.validation.OpenapiRequestValidator
 
OpenapiResponseValidator - Class in ch.nexsol.gateway.validation
Validates a response against the operation the contract resolved for the request: that the status is one the contract declares, that the headers it requires are there, and that the body honours the declared schema.
OpenapiResponseValidator() - Constructor for class ch.nexsol.gateway.validation.OpenapiResponseValidator
 
OpenapiValidationAutoConfiguration - Class in ch.nexsol.gateway.validation.autoconfigure
Auto-configuration registering the OpenAPI validation filter factory.
OpenapiValidationAutoConfiguration() - Constructor for class ch.nexsol.gateway.validation.autoconfigure.OpenapiValidationAutoConfiguration
 
OpenapiValidationGatewayFilterFactory - Class in ch.nexsol.gateway.validation.factory
Gateway filter factory validating the requests and the responses of a route against an OpenAPI contract.
OpenapiValidationGatewayFilterFactory(OpenapiContractRegistry, OpenapiValidationProperties, ValidationMetrics) - Constructor for class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory
Creates the factory.
OpenapiValidationGatewayFilterFactory.Config - Class in ch.nexsol.gateway.validation.factory
OpenapiValidationProperties - Class in ch.nexsol.gateway.validation
Configuration properties for the OpenAPI validation filter, bound under spring.cloud.gateway.server.webflux.openapi-validation.
OpenapiValidationProperties() - Constructor for class ch.nexsol.gateway.validation.OpenapiValidationProperties
 
OpenapiValidationProperties.Direction - Class in ch.nexsol.gateway.validation
Settings of one direction of the exchange.
operation() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.Found
Returns the value of the operation record component.
OPERATION - Static variable in class ch.nexsol.gateway.validation.ValidationAttributes
The contract operation the exchange was validated against, as METHOD /path/{template}.

P

parameters() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.Found
Returns the value of the parameters record component.
PATH_PREFIX_KEY - Static variable in class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory
Configuration key holding the gateway side path prefix to strip.
PathNotFound() - Constructor for record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.PathNotFound
Creates an instance of a PathNotFound record class.
pathVariables() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.Found
Returns the value of the pathVariables record component.

R

REPORT - Enum constant in enum class ch.nexsol.gateway.validation.ValidationMode
Validate and record the outcome, but forward the message unchanged.
REQUEST_ERRORS - Static variable in class ch.nexsol.gateway.validation.ValidationAttributes
The ways the request broke the contract, joined by "; ".
REQUEST_VALID - Static variable in class ch.nexsol.gateway.validation.ValidationAttributes
Whether the request honoured the contract.
resolve(String, HttpMethod) - Method in class ch.nexsol.gateway.validation.OpenapiContract
Resolves the contract operation that should handle the given request.
RESPONSE_ERRORS - Static variable in class ch.nexsol.gateway.validation.ValidationAttributes
The ways the response broke the contract, joined by "; ".
RESPONSE_VALID - Static variable in class ch.nexsol.gateway.validation.ValidationAttributes
Whether the response honoured the contract.

S

setMaxBodySize(DataSize) - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
 
setMode(ValidationMode) - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
 
setPathPrefix(String) - Method in class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory.Config
 
setRequest(OpenapiValidationProperties.Direction) - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties
 
setResponse(OpenapiValidationProperties.Direction) - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties
 
setSpecUrl(String) - Method in class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory.Config
 
setValidateBody(boolean) - Method in class ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
 
shortcutFieldOrder() - Method in class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory
SPEC_URL_KEY - Static variable in class ch.nexsol.gateway.validation.factory.OpenapiValidationGatewayFilterFactory
Configuration key holding the location of the contract.

T

template() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.Found
Returns the value of the template record component.
template() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.MethodNotAllowed
Returns the value of the template record component.
TOO_LARGE - Enum constant in enum class ch.nexsol.gateway.validation.ValidationMetrics.SkipReason
The body is larger than the configured maximum.
toString() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.Found
Returns a string representation of this record class.
toString() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.MethodNotAllowed
Returns a string representation of this record class.
toString() - Method in record class ch.nexsol.gateway.validation.OpenapiContract.Resolution.PathNotFound
Returns a string representation of this record class.
toString() - Method in record class ch.nexsol.gateway.validation.ValidationReport
Returns a string representation of this record class.

U

UNKNOWN_LENGTH - Enum constant in enum class ch.nexsol.gateway.validation.ValidationMetrics.SkipReason
The length of the body is not announced, so buffering it could not be bounded.

V

validate(OpenapiContract, String, OpenapiContract.Resolution.Found, int, HttpHeaders, byte[]) - Method in class ch.nexsol.gateway.validation.OpenapiResponseValidator
Validates a response against the contract.
validateBody(OpenapiContract, String, OpenapiContract.Resolution.Found, MediaType, byte[]) - Method in class ch.nexsol.gateway.validation.OpenapiRequestValidator
Validates the request body against the schema the contract declares for the operation.
validated(String, String, String, ValidationMode, boolean) - Method in class ch.nexsol.gateway.validation.ValidationMetrics
Counts one validated message.
validateParameters(OpenapiContract, String, OpenapiContract.Resolution.Found, ServerHttpRequest) - Method in class ch.nexsol.gateway.validation.OpenapiRequestValidator
Validates the path, query, header and cookie parameters the contract declares for the operation.
VALIDATION_ATTRIBUTES_ATTR - Static variable in class ch.nexsol.gateway.validation.ValidationAttributes
Exchange attribute holding the validation outcome as a Map<String, String> ready to be audited.
ValidationAttributes - Class in ch.nexsol.gateway.validation
The exchange attribute the validation outcome is published under, and the names it is audited with.
ValidationMediaTypes - Class in ch.nexsol.gateway.validation
Which media types this plugin can hold against a schema.
ValidationMetrics - Class in ch.nexsol.gateway.validation
Counts what the validation filter sees, as plain Micrometer meters: the host application exports them to Prometheus, OpenTelemetry or anything else it already configures a registry for.
ValidationMetrics(MeterRegistry) - Constructor for class ch.nexsol.gateway.validation.ValidationMetrics
Creates the meters.
ValidationMetrics.SkipReason - Enum Class in ch.nexsol.gateway.validation
Why a body was forwarded without being held against its schema.
ValidationMode - Enum Class in ch.nexsol.gateway.validation
What the filter does with a message that does not honour the contract, configured independently for the request and the response direction.
ValidationReport - Record Class in ch.nexsol.gateway.validation
Outcome of validating one message against a contract: the list of the ways it breaks that contract, empty when it honours it.
ValidationReport(List) - Constructor for record class ch.nexsol.gateway.validation.ValidationReport
Creates a report.
VALIDATIONS - Static variable in class ch.nexsol.gateway.validation.ValidationMetrics
Counter of the validated messages, tagged by direction, route, operation and outcome.
valueOf(String) - Static method in enum class ch.nexsol.gateway.validation.ValidationMetrics.SkipReason
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class ch.nexsol.gateway.validation.ValidationMode
Returns the enum constant of this class with the specified name.
values() - Static method in enum class ch.nexsol.gateway.validation.ValidationMetrics.SkipReason
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class ch.nexsol.gateway.validation.ValidationMode
Returns an array containing the constants of this enum class, in the order they are declared.
A B C D E F G H I M N O P R S T U V 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form