-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add param option to exclude basic metadata from GET content #1660
base: main
Are you sure you want to change the base?
Conversation
@razvanMiu thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
✅ Deploy Preview for plone-restapi canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor punctuation fixes.
docs/source/usage/content.md
Outdated
@@ -142,6 +142,8 @@ For folderish types, their children are automatically included in the response a | |||
To disable the inclusion, add the `GET` parameter `include_items=false` to the URL. | |||
|
|||
By default, only basic metadata is included. | |||
To exclude basic metadata add the `GET` parameter `include_basic_metadata=false` to the URL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To exclude basic metadata add the `GET` parameter `include_basic_metadata=false` to the URL. | |
To exclude basic metadata, add the `GET` parameter `include_basic_metadata=false` to the URL. |
docs/source/usage/content.md
Outdated
@@ -142,6 +142,8 @@ For folderish types, their children are automatically included in the response a | |||
To disable the inclusion, add the `GET` parameter `include_items=false` to the URL. | |||
|
|||
By default, only basic metadata is included. | |||
To exclude basic metadata add the `GET` parameter `include_basic_metadata=false` to the URL. | |||
To exclude expandable elements add the `GET` parameter `include_expandable_elements=false` to the URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To exclude expandable elements add the `GET` parameter `include_expandable_elements=false` to the URL | |
To exclude expandable elements, add the `GET` parameter `include_expandable_elements=false` to the URL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve docs only. Code should be reviewed by maintainer. Thank you!
@@ -0,0 +1 @@ | |||
- Add param option to exclude basic metadata from GET content - @razvanMiu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@razvanMiu can you elaborate on your use case to exclude basic metadata from the request? Performance? Security?
This PR will add two more optional parameters to GET content:
include_basic_metadata
- by default this isTrue
; IfFalse
all metadatas except@id
,@type
andis_folderish
will be excluded fromresult
allowingmetadata_fields
parameter to specify the desired metadatasinclude_expandable_elements
- by default this isTrue
; IfFalse
the expandable elements will not be included in theresult
Ref #1661