Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/api/test_apidoc.py
Show All 21 Lines | .. http:get:: /api/1/revision/(sha1_git)/ | ||||
:param string sha1_git: hexadecimal representation of the revision **sha1_git** identifier | :param string sha1_git: hexadecimal representation of the revision **sha1_git** identifier | ||||
:reqheader Accept: the requested response content type, | :reqheader Accept: the requested response content type, | ||||
either ``application/json`` (default) or ``application/yaml`` | either ``application/json`` (default) or ``application/yaml`` | ||||
:resheader Content-Type: this depends on :http:header:`Accept` header of request | :resheader Content-Type: this depends on :http:header:`Accept` header of request | ||||
:>json object author: information about the author of the revision | :>json object author: information about the author of the revision | ||||
:>json string author_url: link to :http:get:`/api/1/person/(person_id)/` to get | |||||
information about the author of the revision | |||||
:>json object committer: information about the committer of the revision | :>json object committer: information about the committer of the revision | ||||
:>json string committer_url: link to :http:get:`/api/1/person/(person_id)/` to get | |||||
information about the committer of the revision | |||||
:>json string committer_date: ISO representation of the commit date (in UTC) | :>json string committer_date: ISO representation of the commit date (in UTC) | ||||
:>json string date: ISO representation of the revision date (in UTC) | :>json string date: ISO representation of the revision date (in UTC) | ||||
:>json string directory: the unique identifier that revision points to | :>json string directory: the unique identifier that revision points to | ||||
:>json string directory_url: link to :http:get:`/api/1/directory/(sha1_git)/[(path)/]` | :>json string directory_url: link to :http:get:`/api/1/directory/(sha1_git)/[(path)/]` | ||||
to get information about the directory associated to the revision | to get information about the directory associated to the revision | ||||
:>json string id: the revision unique identifier | :>json string id: the revision unique identifier | ||||
:>json boolean merge: whether or not the revision corresponds to a merge commit | :>json boolean merge: whether or not the revision corresponds to a merge commit | ||||
:>json string message: the message associated to the revision | :>json string message: the message associated to the revision | ||||
▲ Show 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | model module for details about how they are computed.' | ||||
expected_returns = [ | expected_returns = [ | ||||
{ | { | ||||
'name': 'author', | 'name': 'author', | ||||
'type': 'object', | 'type': 'object', | ||||
'doc': 'information about the author of the revision' | 'doc': 'information about the author of the revision' | ||||
}, | }, | ||||
{ | { | ||||
'name': 'author_url', | |||||
'type': 'string', | |||||
'doc': 'link to `</api/1/person/>`_ to get information about the author of the revision' | |||||
}, | |||||
{ | |||||
'name': 'committer', | 'name': 'committer', | ||||
'type': 'object', | 'type': 'object', | ||||
'doc': 'information about the committer of the revision' | 'doc': 'information about the committer of the revision' | ||||
}, | }, | ||||
{ | { | ||||
'name': 'committer_url', | |||||
'type': 'string', | |||||
'doc': 'link to `</api/1/person/>`_ to get information about the committer of the revision' | |||||
}, | |||||
{ | |||||
'name': 'committer_date', | 'name': 'committer_date', | ||||
'type': 'string', | 'type': 'string', | ||||
'doc': 'ISO representation of the commit date (in UTC)' | 'doc': 'ISO representation of the commit date (in UTC)' | ||||
}, | }, | ||||
{ | { | ||||
'name': 'date', | 'name': 'date', | ||||
'type': 'string', | 'type': 'string', | ||||
'doc': 'ISO representation of the revision date (in UTC)' | 'doc': 'ISO representation of the revision date (in UTC)' | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |