-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Implement IJSONSummarySerializerMetadata #1261
Conversation
…e metadata returned by Summary serializer
@ericof thanks for creating this Pull Request and help improve Plone! To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass. Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:
With this simple comment all the jobs will be started automatically. Happy hacking! |
A Plone addon for an image gallery (as an example), wouldn't know which fields it should return in default_metadata_fields. We either need named utilities (so that we can use If we go named utility route, we can also do some plone.directive integration, so that we can mark a field as "included in json summary". |
@jenkins-plone-org please run jobs |
To be honest I was mostly concerned with the use case of a policy package controlling everything (instead of having each package register its own metadata). @sneridagh, @tisto, opinions? |
@erico sorry, I misread your comments and didn't look at your implementation. Good to go, from my part |
@tiberiuichim, @sneridagh We need to worry about the errors on Jenkins. It looks like @ale-rt merged his "Plone site root on the catalog", and this will start breaking tests here |
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.
LGTM. I'd love to have a short section in the docs and maybe a short how-to about how to override this. Maybe @ThomasKindermann @steffenri @iFlameing @jackahl can work on this with a few pointers.
I will merge this, then open a new PR for the documentation |
I saw that coming... See also https://github.com/plone/plone.restapi/pull/1251/files on how to adapt tests for Plone 6. |
This allows addons to extend the metadata returned by the Summary serializer
To always return image_field metadata on summaries, in an addon you will implement a new file called
summary,py
with contentand register it with: