Some small fixes in the API.
This commit is contained in:
parent
3b3d71bfd7
commit
7d163833bd
4 changed files with 8 additions and 2584 deletions
|
@ -45,9 +45,6 @@ class ApiException(Exception):
|
|||
return rv
|
||||
|
||||
|
||||
invalid_request = partial(ApiException, 'invalid_request', 400)
|
||||
|
||||
|
||||
class InvalidRequest(ApiException):
|
||||
def __init__(self, error_description, payload=None):
|
||||
ApiException.__init__(self, 'invalid_request', 400, error_description, payload)
|
||||
|
@ -206,7 +203,7 @@ def validate_json_request(schema_name):
|
|||
validate(request.get_json(), schema)
|
||||
return func(self, *args, **kwargs)
|
||||
except ValidationError as ex:
|
||||
InvalidRequest(ex.message)
|
||||
raise InvalidRequest(ex.message)
|
||||
return wrapped
|
||||
return wrapper
|
||||
|
||||
|
@ -222,8 +219,6 @@ def log_action(kind, user_or_orgname, metadata={}, repo=None):
|
|||
metadata=metadata, repository=repo)
|
||||
|
||||
|
||||
import endpoints.api.legacy
|
||||
|
||||
import endpoints.api.billing
|
||||
import endpoints.api.build
|
||||
import endpoints.api.discovery
|
||||
|
|
Reference in a new issue