public interface ValidatorFactory
Factory interface to access custom validation functions derived from OpenAPI specifications
Modifier and Type | Method and Description |
---|---|
java.util.function.UnaryOperator<io.vertx.core.json.JsonObject> |
getPayloadCleaner(java.lang.String eventBusId)
returns a function to clean request payloads from elements that should not not be in the request incoming in the first place.
|
default java.util.function.Predicate<io.vertx.core.buffer.Buffer> |
getValidatorBuffer(java.lang.String eventBusId,
io.reactivex.Observer<io.vertx.core.buffer.Buffer> observerForEmit)
Creates a buffer validator based on the provided eventBusId
|
java.util.function.Predicate<io.vertx.core.json.JsonObject> |
getValidatorJson(java.lang.String eventBusId,
io.reactivex.Observer<?> observerForEmit)
Creates a json validator based on the provided eventBusId
|
java.util.function.Predicate<io.vertx.core.json.JsonObject> |
getValidatorJsonSkipIfNotFound(java.lang.String eventBusId,
io.reactivex.Observer<?> observerForEmit)
Creates a json validator based on the provided eventBusId
|
java.util.function.UnaryOperator<io.vertx.core.json.JsonObject> getPayloadCleaner(java.lang.String eventBusId)
returns a function to clean request payloads from elements that should not not be in the request incoming in the first place. This partially duplicates what the vertx EventBus API does, with our twists, so other sources like eventbus Redis, Kafka etc. can participate
eventBusId
- default java.util.function.Predicate<io.vertx.core.buffer.Buffer> getValidatorBuffer(java.lang.String eventBusId, io.reactivex.Observer<io.vertx.core.buffer.Buffer> observerForEmit)
Creates a buffer validator based on the provided eventBusId
eventBusId
- eventBusId to validateobserverForEmit
- java.util.function.Predicate<io.vertx.core.json.JsonObject> getValidatorJson(java.lang.String eventBusId, io.reactivex.Observer<?> observerForEmit)
Creates a json validator based on the provided eventBusId
eventBusId
- eventBusId to validateobserverForEmit
- java.util.function.Predicate<io.vertx.core.json.JsonObject> getValidatorJsonSkipIfNotFound(java.lang.String eventBusId, io.reactivex.Observer<?> observerForEmit)
Creates a json validator based on the provided eventBusId
eventBusId
- eventBusId to validateobserverForEmit
-