reactiverse / es4x

🚀 fast JavaScript 4 Eclipse Vert.x
https://reactiverse.io/es4x/
Apache License 2.0
878 stars 75 forks source link

@vertx/web-validation missing api types #537

Closed BeneStem closed 3 years ago

BeneStem commented 3 years ago

Hey there, it seems that @vertx/web-validation is missing important types of its api...

image

The equivalent java imports would be:

import io.vertx.ext.web.validation.builder.*;
import io.vertx.ext.web.validation.builder.Bodies;
import io.vertx.ext.web.validation.builder.Parameters;

Or am I missing something?

Best, /ben

pmlopes commented 3 years ago

This is the fallback generation when the codegen plugin cannot find the right data. I need to verify upstream what is blocking it from being generated!

Thanks!

pmlopes commented 3 years ago

Yes, this is an upstream issue that needs to be addressed:

https://github.com/vert-x3/vertx-web/blob/master/vertx-web-validation/src/main/java/io/vertx/ext/web/validation/builder/ValidationHandlerBuilder.java

Doesn't properly annotate the class so the codegen plugin cannot know the types and assumes any.

BeneStem commented 3 years ago

Thank you very much for the fast reply!

pmlopes commented 3 years ago

I've added the missing annotations upstream. There are still many "genignore" which means that in many places we will have "any", once this gets published I'll run the tsc checks and try to add more details from there.

BeneStem commented 3 years ago

Great, thank you!

BeneStem commented 3 years ago

@pmlopes Its not released on npm yet, right?

pmlopes commented 3 years ago

Hi, no, not yet. The upstream changes are merged on the upcoming 4.2.0 release of vert.x once we have a upstream release I'll build the es4x packages.

BeneStem commented 2 years ago

thanks!

BeneStem commented 2 years ago

@pmlopes is it possible that the Binding for the io.vertx.json.schema.draft7.dsl.Schemas class is still missing?

I can't call objectSchema() or intSchema() and so on...