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

colon in Path generate "resource not Found" #871

Closed
micjaesc opened this issue Mar 19, 2018 · 14 comments
Closed

colon in Path generate "resource not Found" #871

micjaesc opened this issue Mar 19, 2018 · 14 comments
Assignees
Milestone

Comments

@micjaesc
Copy link

@micjaesc micjaesc commented Mar 19, 2018

Version

  • vert.x core:3.5.1
  • vert.x web:3.5.1

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"

@slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented Mar 19, 2018

@micjaesc
Copy link
Author

@micjaesc micjaesc commented Mar 19, 2018

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)

@slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented Mar 19, 2018

i will look at it

@micjaesc
Copy link
Author

@micjaesc micjaesc commented Mar 19, 2018

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
@slinkydeveloper slinkydeveloper self-assigned this Mar 19, 2018
@slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented Mar 19, 2018

Please check this PR: #872

@micjaesc
Copy link
Author

@micjaesc micjaesc commented Mar 19, 2018

thank you. Looks promising.

@micjaesc
Copy link
Author

@micjaesc micjaesc commented Mar 19, 2018

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

@micjaesc
Copy link
Author

@micjaesc micjaesc commented Mar 20, 2018

is there chance for inter release like 3.5.2 ?

@micjaesc
Copy link
Author

@micjaesc micjaesc commented Mar 20, 2018

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

@slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented Mar 21, 2018

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

@micjaesc
Copy link
Author

@micjaesc micjaesc commented Mar 21, 2018

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

@slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented Mar 21, 2018

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

slinkydeveloper added a commit that referenced this issue Mar 22, 2018
Fixed #871
@slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented Apr 23, 2018

I've created a new PR that refactor the path generation: #884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.