-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Nested Namespaces worked in 1.4.8, broken in 2.0.0 #1310
Comments
We are experiencing the same problem. An weird behavior is that if the second level namespace is a param like /:version instead of /v1 in the example above, you would get:
|
@mencargo I've seen that same error too when trying to setup params within namespace; however when I reported the issue I was trying to make it as simple as possible. Both scenarios used to work and now no longer do. However, I don't see any documentation indicating that they were ever supported and I am just hoping we get some clarification on this issue. It's blocking my upgrade from 1.x to 2.x. |
I wonder if this is similar to #1251 or affected in some way. There is also some coverage for nested namespaces here: sinatra/sinatra-contrib/spec/namespace_spec.rb Lines 468 to 478 in 69a7b8f
|
/cc @mwpastore @namusyaka |
I'm going to take a look at this issue in a few days. |
@namusyaka お願い致します! 🙏 |
@aren55555 @mencargo @zzak Could you confirm my pull request(#1322)? |
I'm not sure if nested namespaces are actually supported as I don't see any specific mention of them in the docs. Anyhow in Sinatra 1.4.8 I could define an app like:
cURLing the endpoint:
Now if I define a similar app in Sinatra 2.0.0:
And then cURL the same path:
With this 2.0.0 Sintra app I decided to list all the GET paths:
Which results in:
If I cURL that path I get a successful result:
The repeated v1/v1 is not expected. Sinatra 1.4.8's
/api/v1/books
is the behaviour I would have expected.Is this supposed to work? If there is a better way to define nested namespaces please let me know.
The text was updated successfully, but these errors were encountered: