Open codabat opened 1 year ago
@pk-work can you take a look please?
SchemaParser
has been deprecated and we need to adapt the Vert.x Web Validation handler to this.
@tsegismont I had a look and I think I have an approach to use the new vertx-json-schema validator, but it looks like I need to change
static ValidationHandlerBuilder create(SchemaParser parser)
into
static ValidationHandlerBuilder create(SchemaRepository repo)
and it is not possible to have both signatures at the same time. The effort would be very high.
I've pushed my approach [1], but for some reason it cannot compile, I always get this exception:
io.vertx.docgen.DocGenException: Could not resolve io.vertx.ext.web.validation.builder.ValidationHandlerBuilder#create(SchemaParser)
I've search the whole package, but can't find an place which could result into this error...
Maybe you can have a look
[1] https://github.com/pk-work/vertx-web/tree/4_4_web_validation_replace_deprecated
I've pushed now a new version: https://github.com/pk-work/vertx-web/tree/4_4_web_validation_replace_deprecated
It supports the new and the old signature (see above).
But two test cases (schema with circular refs) are failing.
@pk-work would you mind creating a PR or draft to ease the review?
@tsegismont of course, I just saw that I only pushed it to my fork.
Hello,
I would like to report a bug in the vertx-web 4.4.3 repository related to the ValidationHandlerBuilder class.
Issue: The issue pertains to the deprecated SchemaParser interface being used as a parameter in the create method of ValidationHandlerBuilder. Although the create method itself is not deprecated, it still relies on the deprecated SchemaParser interface.
Expected Behavior: It is expected that a non-deprecated method or alternative approach should be provided for instantiating a ValidationHandlerBuilder without depending on the deprecated SchemaParser interface.
Steps to Reproduce:
Actual Result: The create method requires a SchemaParser instance, which is marked as deprecated, causing concerns regarding the compatibility and recommended practices.
Expected Result: A suitable replacement or updated approach should be available for creating instances of ValidationHandlerBuilder without reliance on the deprecated SchemaParser interface.
Additional Information: Version: vertx-web 4.4.3
Please let me know if any further details are required or if there are specific guidelines to follow for bug reporting in this project.
Thank you for your attention to this matter.
Kind regards, Lorenzo