Small cleanups
This commit is contained in:
Родитель
d129e2351e
Коммит
45fe5fdffb
|
@ -107,7 +107,7 @@ This endpoint allows you to browse through the contents of an Add-on version.
|
|||
:>json object addon: A simplified :ref:`add-on <addon-detail-object>` object that contains only a few properties: ``id``, ``name``, ``icon_url`` and ``slug``.
|
||||
:>json object file: The file attached to this version. See :ref:`version detail -> files[] <version-detail-object>` for more details.
|
||||
:>json string file.content: Raw content of the requested file.
|
||||
:>json string file.selected_file: The selected file, either from the ``file`` parameter or the default (``manifest.json``, ``package.json`` or ``install.rdf``).
|
||||
:>json string file.selected_file: The selected file, either from the ``file`` parameter or the default (manifest.json, install.rdf or package.json for Add-ons as well as the XML file for search engines).
|
||||
:>json array file.entries[]: The complete file-tree of the extracted XPI.
|
||||
:>json boolean/string file.entries[].binary: ``True`` if the file is a binary file (e.g an .exe, dll, java, swf file), ``'image'`` if the file is an image or ``False`` otherwise. If ``False`` or ``'image'`` the file should be presentable to the user.
|
||||
:>json image file.entries[].depth: Level of folder-tree depth, starting with 0.
|
||||
|
|
|
@ -187,8 +187,7 @@ class AddonBrowseVersionSerializer(VersionSerializer):
|
|||
'release_notes', 'reviewed', 'url', 'version',
|
||||
# Our custom fields
|
||||
'file', 'validation_url', 'validation_url_json',
|
||||
'has_been_validated',
|
||||
'addon')
|
||||
'has_been_validated', 'addon')
|
||||
|
||||
def get_validation_url_json(self, obj):
|
||||
return reverse('devhub.json_file_validation', args=[
|
||||
|
|
|
@ -44,6 +44,8 @@ class TestFileEntriesSerializer(TestCase):
|
|||
'http://testserver/firefox/downloads/file/{}'
|
||||
'/notify-link-clicks-i18n.xpi?src=').format(file.pk)
|
||||
|
||||
assert data['selected_file'] == 'manifest.json'
|
||||
|
||||
assert set(data['entries'].keys()) == {
|
||||
'README.md',
|
||||
'_locales', '_locales/de', '_locales/en', '_locales/nb_NO',
|
||||
|
|
Загрузка…
Ссылка в новой задаче