Skip to content

Commit

Permalink
Docs move expansion to usage (#1678)
Browse files Browse the repository at this point in the history
* Move expansion from endpoints to usage

* Update references to expansion.

* Add a complete list of components that support expansion.

* Add change log entry
  • Loading branch information
stevepiercy committed Aug 8, 2023
1 parent b9c067e commit 754b5e5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
1 change: 0 additions & 1 deletion docs/source/endpoints/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ copymove
database
email-notification
email-send
expansion
groups
history
linkintegrity
Expand Down
2 changes: 1 addition & 1 deletion docs/source/endpoints/navroot.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The response has the language folder information as a navigation root:

## Expansion

This endpoint can be used with the {doc}`expansion` mechanism which allows getting more information about a content item in one query, avoiding unnecessary requests.
This endpoint can be used with the {doc}`../usage/expansion` mechanism which allows getting more information about a content item in one query, avoiding unnecessary requests.

If a simple `GET` request is made on the content item, a new entry will be shown on the `@components` entry with the URL of the `@navroot` endpoint.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/endpoints/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ This endpoint returns the proper placement for the newly created translation:

## Expansion

This endpoint can be used with the {doc}`expansion` mechanism which allows getting additional information about a content item in one query, avoiding unnecessary requests.
This endpoint can be used with the {doc}`../usage/expansion` mechanism which allows getting additional information about a content item in one query, avoiding unnecessary requests.

If a simple `GET` request is done on the content item, a new entry will be shown on the `@components` entry, with the URL of the `@translations` endpoint:
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@ This helps the API consumers avoid unnecessary requests.
Say you want to show a document in Plone together with the breadcrumbs and a workflow switcher.
Instead of doing three individual requests, you can expand the breadcrumbs and the workflow "components" within the document `GET` request.

The list of expandable components is listed in the `@components` attribute in the response of any content `GET` request:
The following is a list of components that support expansion.

- {doc}`actions <../endpoints/actions>`
- {doc}`aliases <../endpoints/aliases>`
- {doc}`breadcrumbs <../endpoints/breadcrumbs>`
- {doc}`contextnavigation <../endpoints/contextnavigation>`
- {doc}`navigation <../endpoints/navigation>`
- {doc}`navroot <../endpoints/navroot>`
- {doc}`translations <../endpoints/translations>`
- {doc}`types <../endpoints/types>`
- {doc}`workflow <../endpoints/workflow>`

You can also get the list expandable components by inspecting the `@components` attribute in the response of any content `GET` request, as shown in the following example.

```http
GET /plone/front-page HTTP/1.1
Expand Down
1 change: 1 addition & 0 deletions docs/source/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ authentication
batching
content
customization
expansion
exploring
i18n
serialization
Expand Down
1 change: 1 addition & 0 deletions news/1678.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move expansion docs from endpoints to usage, and add a list of all expandable components. Fixes #1677. @stevepiercy

0 comments on commit 754b5e5

Please sign in to comment.