plone.restapi
plone.restapi copied to clipboard
add url field to Actions
fixes this issue: https://github.com/plone/plone.restapi/issues/817
@ionlizarazu 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:
@jenkins-plone-org please run jobs
With this simple comment all the jobs will be started automatically.
Happy hacking!
@jenkins-plone-org please run jobs
@libargutxi thank you for your contribution! This issue might be more complex than it looks at first sight because REST API design principles need to be taken into account.
Plone REST API uses the concept of resources that are linked via the "@id" attribute, this is the idea of a hypermedia API with linked resources. We currently do not have a similar concept for "actions". There are concepts in the JSON-LD standard but they are very academic and we never implemented them.
If we just expose the Plone Classic URLs, like in this PR, we only serve the Plone Classic use case and ignore Volto and other REST API consumers. The question is: how is Volto or another consumer suppose to handle this URL field in a generic way. If we start using consumer-specific fields, like this URL field, we risk ending up with an overly complex API and duplicate fields (e.g. how should we call the Volto URL actions field, how the Vue actions field, etc.). I think you get the point.
I don't have the answers to the questions that I raise. I just would like to point out the underlying complexity here and that there is no easy and straight-forward solution IMHO.
@ionlizarazu Can you please bring this PR up-to-date?
Updated
@jenkins-plone-org please run jobs
I think we need the plone.volto counterpart (GS config to make sure that no classic URLs are leaked there).
Deploy Preview for plone-restapi canceled.
| Name | Link |
|---|---|
| Latest commit | 6539dc94684c3f321992929bc6f987003460aa90 |
| Latest deploy log | https://app.netlify.com/sites/plone-restapi/deploys/630dc24583e09300085d3845 |
@jenkins-plone-org please run jobs
@tisto Please have a look.
@jenkins-plone-org please run jobs
@jensens @tisto What's the status here? Can we move on with this one, please?
I think we are fine if we merge this one and place an issue in plone.volto
@jensens We also have a PR in plone.volto https://github.com/plone/plone.volto/pull/64