Merge pull request #28 from coreos-inc/swagger2

Switch to Swagger v2
This commit is contained in:
Jake Moshenko 2015-06-29 12:18:10 -04:00
commit 6e6b3c675f
23 changed files with 257 additions and 174 deletions

View file

@ -1,3 +1,5 @@
""" Manage the current user. """
import logging
import json
@ -183,11 +185,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',
@ -807,10 +815,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)