ramses-tech / ramses

RAML + Elasticsearch / Postgres / Mongodb / Your Data Store™ + Pyramid = RESTful API
http://ramses.tech
Apache License 2.0
303 stars 29 forks source link

Change mountpoint to /v1/ to match the RAML file #83

Closed vaz closed 9 years ago

vaz commented 9 years ago

Goes with https://github.com/brandicted/ramses-example/pull/48

Changing the mountpoint in the local.ini template and in the docs.

vaz commented 9 years ago

@jstoiko we discussed this briefly before, but in case you forget...

The reason is that Ra constructs URLs using the baseUri from the RAML, and that baseUri has the path prefix /{version} ... so we need to either mount at /v1/ or change the baseUri path to /api.

If we do the latter (instead of merging these PRs), we need to pass version some other way (querystring param or header)... but it actually would touch less files that way.

Which do you prefer?

vaz commented 9 years ago

Also @jstoiko if we go with this, should we update nefertari and nefertari-example too? They also use the /api/ prefix in docs, templates and the post2api scripts.

jstoiko commented 9 years ago

Same comment as in https://github.com/brandicted/ramses-example/pull/48

If we do the latter (instead of merging these PRs), we need to pass version some other way (querystring param or header)... but it actually would touch less files that way.

What do we need to pass a version for?

vaz commented 9 years ago

@jstoiko I misread the spec and thought passing a version one way or another was mandatory, but of course it only is if you decide the API should be versioned. Easier to just drop it from the example RAML.