Skip to content

Commit

Permalink
Update json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Sep 20, 2024
1 parent 357c34c commit a8d0da7
Showing 1 changed file with 32 additions and 25 deletions.
57 changes: 32 additions & 25 deletions apps_validation/json_schema_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@
},
'required': ['categories'],
}

APP_CAPABILITIES_SCHEMA = {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'description': {'type': 'string'},
'name': {'type': 'string'},
},
'required': ['description', 'name'],
},
}

APP_RUN_AS_CONTEXT_SCHEMA = {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'description': {'type': 'string'},
'gid': {'type': 'integer'},
'group_name': {'type': 'string'},
'user_name': {'type': 'string'},
'uid': {'type': 'integer'},
},
'required': ['description'],
},
}

APP_METADATA_JSON_SCHEMA = {
'type': 'object',
'properties': {
Expand Down Expand Up @@ -62,31 +90,8 @@
'pattern': '[0-9]+.[0-9]+.[0-9]+',
},
'lib_version_hash': {'type': 'string'},
'run_as_context': {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'description': {'type': 'string'},
'gid': {'type': 'integer'},
'group_name': {'type': 'string'},
'user_name': {'type': 'string'},
'uid': {'type': 'integer'},
},
'required': ['description'],
},
},
'capabilities': {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'description': {'type': 'string'},
'name': {'type': 'string'},
},
'required': ['description', 'name'],
},
},
'run_as_context': APP_RUN_AS_CONTEXT_SCHEMA,
'capabilities': APP_CAPABILITIES_SCHEMA,
'host_mounts': {
'type': 'array',
'items': {
Expand Down Expand Up @@ -219,6 +224,8 @@
'icon_url': {
'type': ['string', 'null'],
},
'run_as_context': APP_RUN_AS_CONTEXT_SCHEMA,
'capabilities': APP_CAPABILITIES_SCHEMA,
'maintainers': {
'type': 'array',
'items': {
Expand Down

0 comments on commit a8d0da7

Please sign in to comment.