Skip to content
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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

razvanMiu
Copy link
Contributor

@razvanMiu razvanMiu commented Jun 19, 2023

This PR will add two more optional parameters to GET content:

  • include_basic_metadata - by default this is True; If False all metadatas except @id, @type and is_folderish will be excluded from result allowing metadata_fields parameter to specify the desired metadatas
  • include_expandable_elements - by default this is True; If False the expandable elements will not be included in the result

Ref #1661

@razvanMiu razvanMiu requested a review from avoinea June 19, 2023 11:43
@mister-roboto
Copy link

@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:

@jenkins-plone-org please run jobs

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!

@netlify
Copy link

netlify bot commented Jun 19, 2023

Deploy Preview for plone-restapi canceled.

Name Link
🔨 Latest commit efdca2a
🔍 Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/6535091df1168f0008689ced

@razvanMiu razvanMiu requested a review from davisagli June 19, 2023 11:43
@razvanMiu razvanMiu marked this pull request as draft June 19, 2023 12:07
Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor punctuation fixes.

@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor

@stevepiercy stevepiercy left a 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!

@razvanMiu razvanMiu marked this pull request as ready for review June 19, 2023 13:29
@@ -0,0 +1 @@
- Add param option to exclude basic metadata from GET content - @razvanMiu
Copy link
Member

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?

@davisagli
Copy link
Member

@tisto There is some discussion in the linked issue: #1661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants