From 8061da522f911c842ccec1f72830f94b567570b6 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Mon, 13 May 2024 18:24:50 +0300 Subject: [PATCH 1/4] update schemas --- apps_validation/json_schema_utils.py | 52 ++++++++++++++++++---------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/apps_validation/json_schema_utils.py b/apps_validation/json_schema_utils.py index b396712..41767ae 100644 --- a/apps_validation/json_schema_utils.py +++ b/apps_validation/json_schema_utils.py @@ -3,6 +3,11 @@ 'properties': { 'name': {'type': 'string'}, 'train': {'type': 'string'}, + 'title': {'type': 'string'}, + 'description': {'type': 'string'}, + 'app_version': {'type': 'string'}, + 'home': {'type': 'string'}, + 'icon_url': {'type': 'string'}, 'annotations': { 'type': 'object', 'properties': { @@ -14,12 +19,25 @@ 'type': 'array', 'items': {'type': 'string'}, }, + 'keywords': { + 'type': 'array', + 'items': {'type': 'string'}, + }, + 'categories': { + 'type': 'array', + 'items': {'type': 'string'}, + }, + 'screenshots': { + 'type': 'array', + 'items': {'type': 'string'}, + }, 'maintainers': { 'type': 'array', 'items': { 'type': 'object', 'properties': { 'name': {'type': 'string'}, + 'url': {'type': 'string'}, 'email': {'type': 'string'}, }, 'required': ['name', 'email'], @@ -36,7 +54,7 @@ 'lib_version_hash': {'type': 'string'}, }, 'required': [ - 'name', 'train', 'version', + 'name', 'train', 'version', 'app_version', 'title', 'description', ], 'if': { 'properties': { @@ -279,12 +297,20 @@ 'type': 'string', 'pattern': '[0-9]+.[0-9]+.[0-9]+' }, + # This should be app_metadata, but a key already exists below + # Probably merge them? 'chart_metadata': { 'type': 'object', 'properties': { 'name': { 'type': 'string' }, + 'train': { + 'type': 'string' + }, + 'title': { + 'type': 'string' + }, 'description': { 'type': 'string' }, @@ -298,15 +324,9 @@ 'type': 'string', 'pattern': '[0-9]+.[0-9]+.[0-9]+' }, - 'apiVersion': { + 'app_version': { 'type': 'string', }, - 'appVersion': { - 'type': 'string' - }, - 'kubeVersion': { - 'type': 'string' - }, 'app_readme': {'type': 'string'}, 'detailed_readme': {'type': 'string'}, 'changelog': {'type': ['string', 'null']}, @@ -322,19 +342,13 @@ 'required': ['name', 'email'], } }, - 'dependencies': { - 'type': 'array', - 'items': { - 'type': 'object', - 'properties': { - 'name': {'type': 'string'}, - 'repository': {'type': 'string'}, - 'version': {'type': 'string'} - } - } + 'lib_version': { + 'type': 'string', + 'pattern': '[0-9]+.[0-9]+.[0-9]+', }, + 'lib_version_hash': {'type': 'string'}, 'home': {'type': 'string'}, - 'icon': {'type': 'string'}, + 'icon_url': {'type': 'string'}, 'sources': { 'type': 'array', 'items': { From 6bc34ffa3cecfbff685df78f08df38e1fb671b6b Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Mon, 13 May 2024 18:28:40 +0300 Subject: [PATCH 2/4] add some fields that would give user some initial information about it --- apps_validation/json_schema_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps_validation/json_schema_utils.py b/apps_validation/json_schema_utils.py index 41767ae..c83b0e7 100644 --- a/apps_validation/json_schema_utils.py +++ b/apps_validation/json_schema_utils.py @@ -55,6 +55,7 @@ }, 'required': [ 'name', 'train', 'version', 'app_version', 'title', 'description', + 'home', 'keywords', 'sources', 'maintainers' ], 'if': { 'properties': { From 7d3512d9ea600d1843cb87fdcfcc85b6814b4d45 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Mon, 13 May 2024 18:32:42 +0300 Subject: [PATCH 3/4] add fixme --- apps_validation/json_schema_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps_validation/json_schema_utils.py b/apps_validation/json_schema_utils.py index c83b0e7..05a646e 100644 --- a/apps_validation/json_schema_utils.py +++ b/apps_validation/json_schema_utils.py @@ -298,8 +298,9 @@ 'type': 'string', 'pattern': '[0-9]+.[0-9]+.[0-9]+' }, - # This should be app_metadata, but a key already exists below - # Probably merge them? + # FIXME: This is the same as app_metadata. + # This should probably have to go but keep app_readme, detailed_readme, changelog. + # and get merged with APP_METADATA_JSON_SCHEMA 'chart_metadata': { 'type': 'object', 'properties': { From 77e0371c4060c5283191aaa22ea85307b5f9676c Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Mon, 13 May 2024 22:38:24 +0300 Subject: [PATCH 4/4] remove keywords from required --- apps_validation/json_schema_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps_validation/json_schema_utils.py b/apps_validation/json_schema_utils.py index 05a646e..bd98a9a 100644 --- a/apps_validation/json_schema_utils.py +++ b/apps_validation/json_schema_utils.py @@ -55,7 +55,7 @@ }, 'required': [ 'name', 'train', 'version', 'app_version', 'title', 'description', - 'home', 'keywords', 'sources', 'maintainers' + 'home', 'sources', 'maintainers' ], 'if': { 'properties': {