Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
@leplatrem review.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Nov 2, 2015
1 parent 19ec43e commit 260da3c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Expand Up @@ -9,7 +9,7 @@ This document describes changes between each past release.

**Protocol**

- Add the ``api_version`` to tell which protocol version is
- Add the ``protocol`` to tell which protocol version is
implemented by the service. (#324)


Expand Down
2 changes: 1 addition & 1 deletion cliquet/__init__.py
Expand Up @@ -21,7 +21,7 @@
__version__ = pkg_resources.get_distribution(__package__).version

# The API version is derivated from the module version.
API_VERSION = '%s' % __version__.split('.')[0]
API_VERSION = 'v%s' % __version__.split('.')[0]


DEFAULT_SETTINGS = {
Expand Down
2 changes: 1 addition & 1 deletion cliquet/tests/test_views_hello.py
Expand Up @@ -8,7 +8,7 @@ class HelloViewTest(BaseWebTest, unittest.TestCase):
def test_returns_info_about_url_and_version(self):
response = self.app.get('/')
self.assertEqual(response.json['version'], "0.0.1")
self.assertEqual(response.json['api_version'], "2")
self.assertEqual(response.json['protocol'], "v2")
self.assertEqual(response.json['url'], 'http://localhost/v0/')
self.assertEqual(response.json['hello'], 'myapp')
self.assertEqual(response.json['documentation'],
Expand Down
2 changes: 1 addition & 1 deletion cliquet/views/hello.py
Expand Up @@ -13,7 +13,7 @@ def get_hello(request):
data = dict(
hello=project_name,
version=settings['project_version'],
api_version=API_VERSION,
protocol=API_VERSION,
url=request.route_url(hello.name),
documentation=settings['project_docs']
)
Expand Down
2 changes: 1 addition & 1 deletion cliquet_docs/api/utilities.rst
Expand Up @@ -9,7 +9,7 @@ GET /
The returned value is a JSON mapping containing:

- ``hello``: the name of the service (e.g. ``"reading list"``)
- ``api_version``: the cliquet protocol version (``"2"``)
- ``protocol``: the cliquet protocol version (``"v2"``)
- ``version``: complete version (``"X.Y.Z"``)
- ``url``: absolute URI (without a trailing slash) of the API (*can be used by client to build URIs*)
- ``eos``: date of end of support in ISO 8601 format (``"yyyy-mm-dd"``, undefined if unknown)
Expand Down

0 comments on commit 260da3c

Please sign in to comment.