Skip to content
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

Bug Report: Deprecated SchemaParser Interface in ValidationHandlerBuilder's create Method (vertx-web 4.4.3) #2437

Open
codabat opened this issue Jun 12, 2023 · 6 comments
Assignees
Labels
Milestone

Comments

@codabat
Copy link

codabat commented Jun 12, 2023

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:

  1. Set up the vertx-web 4.4.3 environment.
  2. Attempt to instantiate a ValidationHandlerBuilder using the create method.
  3. Observe the usage of the deprecated SchemaParser interface.

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

@codabat codabat added the bug label Jun 12, 2023
@tsegismont tsegismont self-assigned this Jun 19, 2023
@tsegismont tsegismont modified the milestones: 4.4.4-SNAPSHOT, 4.4.4 Jun 19, 2023
@tsegismont tsegismont assigned pk-work and unassigned tsegismont Jun 19, 2023
@tsegismont
Copy link
Contributor

@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.

@pk-work
Copy link
Contributor

pk-work commented Jun 20, 2023

@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.

@pk-work
Copy link
Contributor

pk-work commented Jun 20, 2023

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

@vietj vietj modified the milestones: 4.4.4, 4.4.5 Jun 22, 2023
@pk-work
Copy link
Contributor

pk-work commented Jun 30, 2023

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.

@tsegismont
Copy link
Contributor

@pk-work would you mind creating a PR or draft to ease the review?

@pk-work
Copy link
Contributor

pk-work commented Jul 3, 2023

@tsegismont of course, I just saw that I only pushed it to my fork.

#2445

@vietj vietj modified the milestones: 4.4.5, 4.4.6 Aug 30, 2023
@vietj vietj modified the milestones: 4.4.6, 4.5.0 Sep 12, 2023
@vietj vietj modified the milestones: 4.5.0, 4.5.1 Nov 15, 2023
@vietj vietj modified the milestones: 4.5.1, 4.5.2 Dec 13, 2023
@vietj vietj modified the milestones: 4.5.2, 4.5.3 Jan 30, 2024
@vietj vietj modified the milestones: 4.5.3, 4.5.4 Feb 6, 2024
@vietj vietj modified the milestones: 4.5.4, 4.5.5 Feb 22, 2024
@vietj vietj removed this from the 4.5.5 milestone Mar 14, 2024
@vietj vietj added this to the 4.5.6 milestone Mar 14, 2024
@vietj vietj modified the milestones: 4.5.6, 4.5.7, 4.5.8 Mar 21, 2024
@vietj vietj modified the milestones: 4.5.8, 4.5.9 May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants