Switch the Python side to Swagger v2

This commit is contained in:
Joseph Schorr 2015-05-14 16:47:38 -04:00
parent 86f400fdf5
commit 0bc1c29dff
21 changed files with 217 additions and 138 deletions

View file

@ -1,3 +1,5 @@
""" Manage the current user. """
import logging
import json
@ -182,11 +184,17 @@ class User(ApiResource):
},
'organizations': {
'type': 'array',
'description': 'Information about the organizations in which the user is a member'
'description': 'Information about the organizations in which the user is a member',
'items': {
'type': 'object'
}
},
'logins': {
'type': 'array',
'description': 'The list of external login providers against which the user has authenticated'
'description': 'The list of external login providers against which the user has authenticated',
'items': {
'type': 'object'
}
},
'can_create_repo': {
'type': 'boolean',
@ -794,10 +802,10 @@ class StarredRepositoryList(ApiResource):
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
class StarredRepository(RepositoryParamResource):
""" Operations for managing a specific starred repository. """
@nickname('deleteStar')
@require_user_admin
def delete(self, namespace, repository):
""" Removes a star from a repository. """
user = get_authenticated_user()
repo = model.get_repository(namespace, repository)