Skip to content

Commit

Permalink
Add deprecation message on @components endpoint. Enable deprecation m…
Browse files Browse the repository at this point in the history
…essages on buildout.
  • Loading branch information
tisto committed Apr 29, 2017
1 parent 8271e5e commit 026859e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions base.cfg
Expand Up @@ -21,6 +21,7 @@ auto-checkout =
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
deprecation-warnings = on
eggs =
Plone
Pillow
Expand Down
5 changes: 5 additions & 0 deletions src/plone/restapi/services/components/get.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from plone.restapi.services import Service
from zope.deprecation import deprecate
from zope.component import getMultiAdapter
from zope.interface import implements
from zope.publisher.interfaces import IPublishTraverse
Expand Down Expand Up @@ -66,6 +67,10 @@ def _render_component(self, component_id):

return self._wrap_component_items(items, component_id)

@deprecate(
'The "@components" endpoint is deprecated. Please call the '
'"@breadcrumbs" and the "@navigation" endpoints on the site root.'
)
def reply(self):
components = []
for component_id in self._component_ids:
Expand Down

0 comments on commit 026859e

Please sign in to comment.