-
Notifications
You must be signed in to change notification settings - Fork 42
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
Improved vertx-web, as Akka-Http #41
Comments
@aesteve Hold on with Swagger, we've just started with GSoC project in that area, we might have some heavy reactoring in vertx-web to easily expose the routes and their configs so swagger/raml/something else can generate their metadata. |
@aesteve thank you for the kind words :) |
@pmlopes I thought the goal was to create routes from a swagger / raml description, not the other way around. But anyway, I'm rooting for a full refactor of vertx-web to improve it ! I know we're on the right track Thanks to you both ! We're gonna make it :) |
Hi @aesteve, @codepitbull there is some confusion here, the gsoc project hasn't officially started but @slinkydeveloper is already working on it. What was announced recently about swagger is a different project with some overlapping goals it is not what we were planning for GSoC. If there are questions I think it is best if we include Francesco so we can help him making a great project. |
Hi @aesteve, as you requested I slightly changed my project to add this features. Watch what i'm working on: HTTPRequestValidationHandler
For now I haven't created a standard failure handler, but when the validation fail it returns inside the failure handler a ValidationException |
Hello @slinkydeveloper Very nice to see what you're going on with. At the end of the day, I think an alternative routing approach could use your validators to bring even more expressiveness to vertx-web's routing mechanism. Correct me if I'm wrong but for now, your projects allow to plug "validators" to a (set of) route(s). You can see an example of that here. Let me explain in details what's going on : So in my opinion both approaches are complementary. A functional router would make extensive use of your validation mechanism. What do you think ? Let me know if things are unclear, or if you want me to stop working on this subject if you think it overlaps in some way with what you're investigating at the moment ! Thanks @slinkydeveloper ! EDIT : we can discuss this everywhere you find more suitable, no worries. |
People interested in this (a functional way to describe routes and endpoints) may be interested in Tapir which now supports Vert.x as a server backend. |
Hi @codepitbull and thanks for all your amazing work on vertx-lang-scala.
Something I've been looking for years with Vert.x is :
RoutingContext
likecontext.getParam("test")
should be an Integer if I checked for it beforeAt the end of the day, I think Java won't allow such features. I tried a few implementations that mostly use reflection (thus no compile-time checking). I was looking for another way to do so.
I found the akka-http very interesting, and am pretty sure we could be able to build such a thing with Vert.x.
It extensively uses the magnet pattern (which is also very very interesting).
I wanted to see if you were interested in helping me building such a "DSL" kindof. That'd allow Vert.x scala users to work in a very very type safe environment, reducing the need to check parameters at runtime and returning errors manually, and also generating accurate documentation.
Let me know if you have some questions ! Thanks.
The text was updated successfully, but these errors were encountered: