Convert old style jsonschema required params to new style.

This commit is contained in:
jakedt 2014-03-17 12:25:41 -04:00
parent 5bb4008880
commit ddf5f2053c
11 changed files with 79 additions and 59 deletions

View file

@ -62,12 +62,14 @@ class PermissionPrototypeList(ApiResource):
'id': 'NewPrototype',
'type': 'object',
'description': 'Description of a new prototype',
'required': True,
'required': [
'role',
'delegate',
],
'properties': {
'role': {
'type': 'string',
'description': 'Role that should be applied to the delegate',
'required': True,
'enum': [
'read',
'write',
@ -77,28 +79,31 @@ class PermissionPrototypeList(ApiResource):
'activating_user': {
'type': 'object',
'description': 'Repository creating user to whom the rule should apply',
'required': [
'name',
],
'properties': {
'name': {
'type': 'string',
'description': 'The username for the activating_user',
'required': True,
},
},
},
'delegate': {
'type': 'object',
'description': 'Information about the user or team to which the rule grants access',
'required': True,
'required': [
'name',
'kind',
],
'properties': {
'name': {
'type': 'string',
'description': 'The name for the delegate team or user',
'required': True,
},
'kind': {
'type': 'string',
'description': 'Whether the delegate is a user or a team',
'required': True,
'enum': [
'user',
'team',
@ -183,12 +188,13 @@ class PermissionPrototype(ApiResource):
'id': 'PrototypeUpdate',
'type': 'object',
'description': 'Description of a the new prototype role',
'required': True,
'required': [
'role',
],
'properties': {
'role': {
'type': 'string',
'description': 'Role that should be applied to the permission',
'required': True,
'enum': [
'read',
'write',