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

Feature request: drop restriction on version names #73

Closed
softwaregravy opened this issue Aug 10, 2013 · 1 comment
Closed

Feature request: drop restriction on version names #73

softwaregravy opened this issue Aug 10, 2013 · 1 comment
Assignees

Comments

@softwaregravy
Copy link

I see in the routing code

raise ArgumentError, "Got invalid version: '#{version}'" unless version =~ /\A\d+\Z/

I'd like to have non-integer version names.

I have 2 use cases where I want to have non-integer api versions

  • I don't like leaking my versions to the outside world. I often use dates or codenames for versions. e.g. v20130701 (which I could still use as a big number). Kind of like how Heroku differentiates their stack versions (cedar vs bamboo)
  • I do few integrations with big partners and I'd like to have them on a custom version/endpoint. If my big partners are BigCorp and Acme, I can build separate versions for each of them, but share everything underneath -- just the path is different initially (were the version method in the controller to accept an array of version names). Then, down the road, if one of them wants a change, I can customize just for one of them because they're already on their own version without affecting the other.
@Sutto
Copy link
Owner

Sutto commented Sep 14, 2013

Hey @softwaregravy,

I'm open to the suggestion - as long as it's possible to maintain consistency with the existing one.

Unfortunately, I'm incredibly busy at the moment with work, so I can't yet implement it myself - but if you'd be willing to put a patch together, I'd be happy to review it and likely pull it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants