plone.restapi/plone-only-login: Update docs to reflect changes in nav/breadcrumbs endpoints.

Timo Stollenwerk <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: plone.restapi
Branch: refs/heads/plone-only-login
Date: 2017-07-14T18:40:15+02:00
Author: Timo Stollenwerk (tisto) <[email protected]>
Commit: https://github.com/plone/plone.restapi/commit/8dc50d18e4e83fc4bab9a5322893ce2c6984b538

Update docs to reflect changes in nav/breadcrumbs endpoints.

Files changed:
A docs/source/_json/component_breadcrumbs.req
A docs/source/_json/component_breadcrumbs.resp
A docs/source/_json/component_navigation.req
A docs/source/_json/component_navigation.resp
M docs/source/_json/breadcrumbs.req
M docs/source/_json/breadcrumbs.resp
M docs/source/_json/navigation.req
M docs/source/_json/navigation.resp
M docs/source/components.rst
M src/plone/restapi/tests/test_documentation.py

diff --git a/docs/source/_json/breadcrumbs.req b/docs/source/_json/breadcrumbs.req
index 9693c4d3..8370e19a 100644
--- a/docs/source/_json/breadcrumbs.req
+++ b/docs/source/_json/breadcrumbs.req
@@ -1,3 +1,3 @@
-GET /plone/front-page/@components/breadcrumbs HTTP/1.1
+GET /plone/front-page/@breadcrumbs HTTP/1.1
 Accept: application/json
 Authorization: Basic YWRtaW46c2VjcmV0
diff --git a/docs/source/_json/breadcrumbs.resp b/docs/source/_json/breadcrumbs.resp
index 647f746a..00d2a168 100644
--- a/docs/source/_json/breadcrumbs.resp
+++ b/docs/source/_json/breadcrumbs.resp
@@ -1,14 +1,12 @@
 HTTP/1.1 200 OK
 Content-Type: application/json
 
-[
-  {
-    "@id": "http://localhost:55001/plone/front-page/@components/breadcrumbs", 
-    "items": [
-      {
-        "title": "Welcome to Plone", 
-        "url": "http://localhost:55001/plone/front-page"
-      }
-    ]
-  }
-]
\ No newline at end of file
+{
+  "@id": "http://localhost:55001/plone/front-page/@breadcrumbs", 
+  "items": [
+    {
+      "title": "Welcome to Plone", 
+      "url": "http://localhost:55001/plone/front-page"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/docs/source/_json/component_breadcrumbs.req b/docs/source/_json/component_breadcrumbs.req
new file mode 100644
index 00000000..9693c4d3
--- /dev/null
+++ b/docs/source/_json/component_breadcrumbs.req
@@ -0,0 +1,3 @@
+GET /plone/front-page/@components/breadcrumbs HTTP/1.1
+Accept: application/json
+Authorization: Basic YWRtaW46c2VjcmV0
diff --git a/docs/source/_json/component_breadcrumbs.resp b/docs/source/_json/component_breadcrumbs.resp
new file mode 100644
index 00000000..647f746a
--- /dev/null
+++ b/docs/source/_json/component_breadcrumbs.resp
@@ -0,0 +1,14 @@
+HTTP/1.1 200 OK
+Content-Type: application/json
+
+[
+  {
+    "@id": "http://localhost:55001/plone/front-page/@components/breadcrumbs", 
+    "items": [
+      {
+        "title": "Welcome to Plone", 
+        "url": "http://localhost:55001/plone/front-page"
+      }
+    ]
+  }
+]
\ No newline at end of file
diff --git a/docs/source/_json/component_navigation.req b/docs/source/_json/component_navigation.req
new file mode 100644
index 00000000..8de636fd
--- /dev/null
+++ b/docs/source/_json/component_navigation.req
@@ -0,0 +1,3 @@
+GET /plone/front-page/@components/navigation HTTP/1.1
+Accept: application/json
+Authorization: Basic YWRtaW46c2VjcmV0
diff --git a/docs/source/_json/component_navigation.resp b/docs/source/_json/component_navigation.resp
new file mode 100644
index 00000000..da3406d6
--- /dev/null
+++ b/docs/source/_json/component_navigation.resp
@@ -0,0 +1,18 @@
+HTTP/1.1 200 OK
+Content-Type: application/json
+
+[
+  {
+    "@id": "http://localhost:55001/plone/front-page/@components/navigation", 
+    "items": [
+      {
+        "title": "Home", 
+        "url": "http://localhost:55001/plone"
+      }, 
+      {
+        "title": "Welcome to Plone", 
+        "url": "http://localhost:55001/plone/front-page"
+      }
+    ]
+  }
+]
\ No newline at end of file
diff --git a/docs/source/_json/navigation.req b/docs/source/_json/navigation.req
index 8de636fd..9cdab891 100644
--- a/docs/source/_json/navigation.req
+++ b/docs/source/_json/navigation.req
@@ -1,3 +1,3 @@
-GET /plone/front-page/@components/navigation HTTP/1.1
+GET /plone/front-page/@navigation HTTP/1.1
 Accept: application/json
 Authorization: Basic YWRtaW46c2VjcmV0
diff --git a/docs/source/_json/navigation.resp b/docs/source/_json/navigation.resp
index da3406d6..c44ab952 100644
--- a/docs/source/_json/navigation.resp
+++ b/docs/source/_json/navigation.resp
@@ -1,18 +1,16 @@
 HTTP/1.1 200 OK
 Content-Type: application/json
 
-[
-  {
-    "@id": "http://localhost:55001/plone/front-page/@components/navigation", 
-    "items": [
-      {
-        "title": "Home", 
-        "url": "http://localhost:55001/plone"
-      }, 
-      {
-        "title": "Welcome to Plone", 
-        "url": "http://localhost:55001/plone/front-page"
-      }
-    ]
-  }
-]
\ No newline at end of file
+{
+  "@id": "http://localhost:55001/plone/front-page/@navigation", 
+  "items": [
+    {
+      "title": "Home", 
+      "url": "http://localhost:55001/plone"
+    }, 
+    {
+      "title": "Welcome to Plone", 
+      "url": "http://localhost:55001/plone/front-page"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/docs/source/components.rst b/docs/source/components.rst
index 49db7373..5ef946cb 100644
--- a/docs/source/components.rst
+++ b/docs/source/components.rst
@@ -14,11 +14,11 @@ Breadcrumbs
 Getting the breadcrumbs for the current page:
 
 ..  http:example:: curl httpie python-requests
-    :request: _json/breadcrumbs.req
+    :request: _json/components_breadcrumbs.req
 
 Example response:
 
-.. literalinclude:: _json/breadcrumbs.resp
+.. literalinclude:: _json/components_breadcrumbs.resp
    :language: http
 
 Navigation
@@ -27,9 +27,9 @@ Navigation
 Getting the top navigation items:
 
 ..  http:example:: curl httpie python-requests
-    :request: _json/navigation.req
+    :request: _json/components_navigation.req
 
 Example response:
 
-.. literalinclude:: _json/navigation.resp
+.. literalinclude:: _json/components_navigation.resp
    :language: http
diff --git a/src/plone/restapi/tests/test_documentation.py b/src/plone/restapi/tests/test_documentation.py
index 4f426083..65655b40 100644
--- a/src/plone/restapi/tests/test_documentation.py
+++ b/src/plone/restapi/tests/test_documentation.py
@@ -706,14 +706,24 @@ def test_documentation_groups_delete(self):
 
     def test_documentation_breadcrumbs(self):
         response = self.api_session.get(
-            '{}/@components/breadcrumbs'.format(self.document.absolute_url()))
+            '{}/@breadcrumbs'.format(self.document.absolute_url()))
         save_request_and_response_for_docs('breadcrumbs', response)
 
     def test_documentation_navigation(self):
         response = self.api_session.get(
-            '{}/@components/navigation'.format(self.document.absolute_url()))
+            '{}/@navigation'.format(self.document.absolute_url()))
         save_request_and_response_for_docs('navigation', response)
 
+    def test_documentation_componente_breadcrumbs(self):
+        response = self.api_session.get(
+            '{}/@components/breadcrumbs'.format(self.document.absolute_url()))
+        save_request_and_response_for_docs('component_breadcrumbs', response)
+
+    def test_documentation_components_navigation(self):
+        response = self.api_session.get(
+            '{}/@components/navigation'.format(self.document.absolute_url()))
+        save_request_and_response_for_docs('component_navigation', response)
+
     def test_documentation_principals(self):
         gtool = api.portal.get_tool('portal_groups')
         properties = {



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.