Skip to content

Commit

Permalink
Merge pull request #556 from Cornices/dugagjin-@fix/depth
Browse files Browse the repository at this point in the history
Frame was always set to 2 for resource decorator.
  • Loading branch information
leplatrem committed Apr 21, 2021
2 parents 420c05a + 23f0866 commit 9e7e710
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cornice/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def wrapper(klass):
return wrapper


def add_resource(klass, depth=1, **kw):
def add_resource(klass, depth=2, **kw):
"""Function to declare resources of a Class.
All the methods of this class named by the name of HTTP resources
Expand Down Expand Up @@ -116,7 +116,7 @@ class User(object):
klass.__name__.lower())
service_name = prefix + service_name
service = services[service_name] = Service(name=service_name,
depth=2, **service_args)
depth=depth, **service_args)
# ensure the service comes with the same properties as the wrapped
# resource
functools.update_wrapper(service, klass)
Expand Down

0 comments on commit 9e7e710

Please sign in to comment.