Skip to content

Commit

Permalink
Make version schema more strict
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed May 15, 2024
1 parent d830c7e commit 1e30270
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps_validation/json_schema_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@
'pattern': '[0-9]+.[0-9]+.[0-9]+'
},
'app_metadata': APP_METADATA_JSON_SCHEMA,
'readme': {'type': ['string', 'null']},
'changelog': {'type': ['string', 'null']},
'schema': {
'type': 'object',
'properties': {
Expand Down Expand Up @@ -330,7 +332,7 @@
},
'required': [
'healthy', 'supported', 'healthy_error', 'location', 'last_update', 'required_features',
'human_version', 'version', 'app_metadata', 'schema',
'human_version', 'version', 'app_metadata', 'schema', 'readme', 'changelog',
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion catalog_reader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def get_app_version_details(
for key, filename, parser in (
('app_metadata', 'app.yaml', yaml.safe_load),
('schema', 'questions.yaml', yaml.safe_load),
('readme', 'README.md', markdown.markdown), # TODO: Has been changed, make sure json schema accounts for it
('readme', 'README.md', markdown.markdown),
('changelog', 'CHANGELOG.md', markdown.markdown),
):
if os.path.exists(os.path.join(version_path, filename)):
Expand Down

0 comments on commit 1e30270

Please sign in to comment.