Vertx-web: colon in Path generate "resource not Found"

Created on 19 Mar 2018  路  14Comments  路  Source: vert-x3/vertx-web

Version

Context

We have to expose API with path, which includes : (colon) like : domain/v1/user/aa:bb/subscriptions

It looks our router is not able to match to any of our endpoint
Fragment from openapi.yaml (yes, we are using OpenAPI3RouterFactory)

paths:
  /v1/user/{uuid}/subscriptions:

PS
Present response : "Resource not found"

componenapi-contracbug

All 14 comments

forget to mention, of course it was encoded, just pasted here decoded
Anyway testing via domain/v1/user/a%3Ab/subscriptions and It gives same result (Resource not found)

i will look at it

some hint, when using regular vertx router , then all is fine

val router = routerFactory.router
            with(router) {
                get("/v1/user/:UUID/subscriptions")

only when switching to OpenAPI3RouterFactory, problem appears

Additional info. yml defintion says about this parameter as

      in: path
      required: true
      schema:
        type: string

thank you. Looks promising.

I can see it will be released with 3.6.0 , right?
So, what is the schedule for it, estimation of deploy/release date?

is there chance for inter release like 3.5.2 ?

after fix, I will be able to use : or only encoded %3A or both ?

I don't know when the next version will be release. I think that : won't work because it's a reserved character that should be escaped

Just watch this regex https://github.com/vert-x3/vertx-web/pull/872/files#diff-ef77bbac586ab216b4fc91092e1085fcR91

In the spec (https://tools.ietf.org/html/rfc3986#section-3.3) we found out that ':' is technically valid in the _path_ segment of a url - so we do not need encode

Please look at field allowReserved (that we don't support, we assert that is always false) https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#fixed-fields-10

I've created a new PR that refactor the path generation: https://github.com/vert-x3/vertx-web/pull/884

Was this page helpful?
0 / 5 - 0 ratings