1

What is the preferred method for versioning Sinatra end-points.

I have an end-point named purchases. For v 0.1, should that be...?

get '/0.1/purchases' do
end

The Sinatra documentation was not particularly helpful.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Som Poddar
  • 1,428
  • 1
  • 15
  • 22
  • 1
    Versioning URLS is rather controversial. I don't think Sinatra provides anything out of the box to handle it, but you might want to read this question for ideas on how to (conceptually) go about it: http://stackoverflow.com/questions/389169/best-practices-for-api-versioning – Hector Correa Dec 15 '14 at 23:17
  • This isn't something that falls under a specification where the Sinatra folks could implement it; More often that not it falls into the laps of the developers who are creating the API, meaning you and your team and/or enterprise. – the Tin Man Dec 15 '14 at 23:37

1 Answers1

1

I've kept this one bookmarked:

Best practices for API versioning?

Another:

Versioning REST API

Or:

https://blog.apigee.com/detail/restful_api_design_tips_for_versioning

I think they have some free API book downloads that might prove helpful, too.

(And as the other commenter noted, this topic tends to generate lots of discussion.)

Community
  • 1
  • 1
TK-421
  • 10,598
  • 3
  • 38
  • 34