-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce validators in the http binding #435
Introduce validators in the http binding #435
Conversation
caf8317
to
1c9e9c0
Compare
.../aklivity/zilla/runtime/engine/internal/validator/config/AvroValidatorConfigAdapterTest.java
Outdated
Show resolved
Hide resolved
import io.aklivity.zilla.runtime.binding.http.config.HttpVersion; | ||
import io.aklivity.zilla.runtime.binding.http.internal.types.String16FW; | ||
import io.aklivity.zilla.runtime.binding.http.internal.types.String8FW; | ||
import io.aklivity.zilla.runtime.engine.internal.validator.config.AvroValidatorConfig; | ||
import io.aklivity.zilla.runtime.engine.internal.validator.config.CatalogedConfig; | ||
import io.aklivity.zilla.runtime.engine.internal.validator.config.StringValidatorConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In preparation for hoisting out the validators, this should be using a TestValidator
instead of specific implementations.
The string validator and avro validator config tests belong closer to those implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is coming in PR #440.
|
||
private List<CatalogedConfig> catalogs; | ||
private String subject; | ||
|
||
AvroValidatorConfigBuilder( | ||
Function<AvroValidatorConfig, T> mapper) | ||
Function<ValidatorConfig, T> mapper) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand why we did this, but it doesn't feel right for the AvroValidatorConfigBuilder
not to build an AvroValdiatorConfig
when Function.identity()
is passed as the mapper
. Instead it will return ValidatorConfig
from .build()
.
Maybe keep this concrete as AvroValidatorConfig
, and handle the implicit cast in the AvroValidatorConfig.builder(...)
methods by adjusting the mapper before passing in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fixed 🤔 pls chk
Description
Introduce validators in the http binding.
Fixes # (issue)