vertx-web icon indicating copy to clipboard operation
vertx-web copied to clipboard

HTTP/REST Matrix support

Open Tibor17 opened this issue 4 years ago • 6 comments

Pls support the matrix in Vertx. Example of the http matrix: http://example.com/rest/api/product/groups;id=1;id=2;id=3/categories;name=foo/objects;color=green/ Unlike http queries, the matrix is part of URI and it is mandatory to use the matrix in order to successfully map and handle the request in Java handlers. Instead of matrix I have to use parameter and parse the syntax of http matrix, i.e. /rest/api/product/groups;:ids/categories;:cats/.

Tibor17 avatar Sep 18 '21 16:09 Tibor17

Hi @Tibor17 I do believe we have some support for matrix in the openapi module. Can you detail a bit more of the use case you're trying to address?

pmlopes avatar Sep 20 '21 10:09 pmlopes

@Tibor17 I did some digging this morning and this is relatively simple to implement. Have a look at my proof-of-concept here:

https://github.com/InfoSec812/vertx-matrix-params-example/blob/main/src/main/java/com/example/matrix_testing/MainVerticle.java#L45

InfoSec812 avatar Sep 20 '21 13:09 InfoSec812

I want to have this feature in Vertx, not in my code. We should convince the users that their code is lite and we provide API with everything they need.

On Mon, Sep 20, 2021 at 3:56 PM Deven Phillips @.***> wrote:

@Tibor17 https://github.com/Tibor17 I did some digging this morning and this is relatively simple to implement. Have a look at my proof-of-concept here:

https://github.com/InfoSec812/vertx-matrix-params-example/blob/main/src/main/java/com/example/matrix_testing/MainVerticle.java#L45

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-web/issues/2050#issuecomment-922950653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH7ER3NEHAW4WDNRXRUHEDUC44O3ANCNFSM5EJLWDRA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Tibor17 avatar Sep 21 '21 10:09 Tibor17

@Tibor17 In my opinion, unless the feature is ubiquitous and used by a majority of Vert.x developers, it does not belong inside of the core modules. Adding too many features is how toolkits and frameworks end up bloated. An argument could be made for implementing this as an extension module, but I am not sure if that is something that the core team would consider. It's such a small feature that I would suggest creating a library module which implements this and contribute it to Vert.x.

InfoSec812 avatar Sep 21 '21 11:09 InfoSec812

Do you know the annotarions in javaee or karta or Spring? If we want to be top framework, we have to simplify their life of developera. That's often their argument. We do not use the annotarions and beans so we should embed this funkcionality into the request objekt which is a comfort for the devs.

Dňa ut 21. 9. 2021, 13:44 Deven Phillips @.***> napísal(a):

@Tibor17 https://github.com/Tibor17 In my opinion, unless the feature is ubiquitous and used by a majority of Vert.x developers, it does not belong inside of the core modules. Adding too many features is how toolkits and frameworks end up bloated. An argument could be made for implementing this as an extension module, but I am not sure if that is something that the core team would consider. It's such a small feature that I would suggest creating a library module which implements this and contribute it to Vert.x.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-web/issues/2050#issuecomment-923901836, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH7ERY5LZDMITQQVYEDDHDUDBVZTANCNFSM5EJLWDRA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Tibor17 avatar Sep 21 '21 15:09 Tibor17

As far as I can see, matrix never graduated to a w3c rfc/standard. Given that, I have to agree with @InfoSec812 on keeping vertx simple and standards compliant (if possible).

Now I also agree with @Tibor17 that users should not have to build the kitchen sink every time. I do see that if such support is interesting, why not taking the proposal from @InfoSec812 and make it a jar, so users can just add a dependency to their projects if needed?

pmlopes avatar Sep 21 '21 20:09 pmlopes