-
Couldn't load subscription status.
- Fork 223
Open
Description
In Grape, it's possible to define multiple versions e.g.:
class V1 < Grape::API
version 'v1', 'v2'
get '/foos' do
# your code for GET /foo
end
endThis produces a value for path and http.route that looks like this:
/["v1", "v2"]/foos/Reference:
Line 96 in 79fa587
| version = endpoint.routes.first.options[:version]&.to_s |
Perhaps this is to promote low cardinality URL as per specs but would it hurt if we add an ability or configuration to maybe produce something like:
/{v1|v2}/foos/
/(v1|v2)/foos/
/v1|v2/foos/
/{v1|v2}/foos/
/:version/foos/ # Static value?I'm not sure if a pipe or any of my recommended symbols violate any spec but it's mainly for readability as ["v1", "v2"] looks like a typo or a misconfiguration.
Thoughts?
Metadata
Metadata
Assignees
Labels
No labels