Repository: nextcloud/appstore

Issue:
API: Expose app certificate
The certificate should be exposed in the api. Serializers and docs need to be adjusted.



Discussion:

Resolving patch:
diff --git a/nextcloudappstore/core/api/v1/serializers.py b/nextcloudappstore/core/api/v1/serializers.py
--- a/nextcloudappstore/core/api/v1/serializers.py
+++ b/nextcloudappstore/core/api/v1/serializers.py
@@ -99,7 +99,7 @@ class Meta:
             'id', 'categories', 'user_docs', 'admin_docs', 'developer_docs',
             'issue_tracker', 'website', 'created', 'last_modified', 'releases',
             'screenshots', 'translations', 'featured', 'authors',
-            'rating_recent', 'rating_overall'
+            'rating_recent', 'rating_overall', 'certificate'
         )
 
 
diff --git a/nextcloudappstore/core/migrations/0001_initial.py b/nextcloudappstore/core/migrations/0001_initial.py
--- a/nextcloudappstore/core/migrations/0001_initial.py
+++ b/nextcloudappstore/core/migrations/0001_initial.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Generated by Django 1.9.8 on 2016-09-06 18:24
+# Generated by Django 1.9.8 on 2016-09-09 12:38
 from __future__ import unicode_literals
 
 from django.conf import settings
@@ -34,6 +34,7 @@ class Migration(migrations.Migration):
                 ('rating_recent', models.FloatField(default=0.5, verbose_name='Recent rating')),
                 ('rating_overall', models.FloatField(default=0.5, verbose_name='Overall rating')),
                 ('last_release', models.DateTimeField(db_index=True, default=django.utils.timezone.now, editable=False, verbose_name='Last release at')),
+                ('certificate', models.TextField(verbose_name='Certificate')),
             ],
             options={
                 'verbose_name': 'App',
@@ -80,10 +81,10 @@ class Migration(migrations.Migration):
             ],
             options={
                 'managed': True,
-                'db_tablespace': '',
-                'default_permissions': (),
                 'verbose_name': 'App Rating Translation',
                 'db_table': 'core_apprating_translation',
+                'default_permissions': (),
+                'db_tablespace': '',
             },
         ),
         migrations.CreateModel(
@@ -118,10 +119,10 @@ class Migration(migrations.Migration):
             ],
             options={
                 'managed': True,
-                'db_tablespace': '',
-                'default_permissions': (),
                 'verbose_name': 'App Translation',
                 'db_table': 'core_app_translation',
+                'default_permissions': (),
+                'db_tablespace': '',
             },
         ),
         migrations.CreateModel(
@@ -149,10 +150,10 @@ class Migration(migrations.Migration):
             ],
             options={
                 'managed': True,
-                'db_tablespace': '',
-                'default_permissions': (),
                 'verbose_name': 'Category Translation',
                 'db_table': 'core_category_translation',
+                'default_permissions': (),
+                'db_tablespace': '',
             },
         ),
         migrations.CreateModel(
diff --git a/nextcloudappstore/core/models.py b/nextcloudappstore/core/models.py
--- a/nextcloudappstore/core/models.py
+++ b/nextcloudappstore/core/models.py
@@ -85,6 +85,7 @@ class App(TranslatableModel):
     last_release = DateTimeField(editable=False, db_index=True,
                                  verbose_name=_('Last release at'),
                                  default=timezone.now)
+    certificate = TextField(verbose_name=_('Certificate'))
 
     class Meta:
         verbose_name = _('App')


Test patch: