-
-
Notifications
You must be signed in to change notification settings - Fork 88
Option to transform primary field target to provide information about the target rather than just it's URL #1903
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
base: main
Are you sure you want to change the base?
Conversation
… to that of image and file fields
@JeffersonBledsoe 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! |
…de information about the target rather than just it's URL plone#1903
… if we've already deserialized a field. plone#1903
@davisagli I've been having some issues trying to complete this and wanted to check it made sense as it would be a breaking change without the environment variable. The functionality mostly works well, but as you can see from the latest test runs, the
|
Currently, if you anonymously get data from a field which points to an object which the requirements for an object with a PrimaryField (e.g. a block with a
url
field which points to a dexterity file object), you are always given the@@download
version of the URL. This isn't always desirable as you may have content on the 'display' version of the view.This PR changes this view to expand into information about the primary field target so that the consumer of the REST API response (e.g. Volto) can make the decision on whether to open the content object or download it. Currently this is behind an environment variable to test the behaviour.
📚 Documentation preview 📚: https://plonerestapi--1903.org.readthedocs.build/