plone.restapi icon indicating copy to clipboard operation
plone.restapi copied to clipboard

add url field to Actions

Open ionlizarazu opened this issue 4 years ago • 13 comments

fixes this issue: https://github.com/plone/plone.restapi/issues/817

ionlizarazu avatar Feb 24 '21 08:02 ionlizarazu

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

mister-roboto avatar Feb 24 '21 08:02 mister-roboto

@jenkins-plone-org please run jobs

ionlizarazu avatar Feb 24 '21 09:02 ionlizarazu

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

tisto avatar Feb 24 '21 09:02 tisto

@ionlizarazu Can you please bring this PR up-to-date?

nileshgulia1 avatar Apr 14 '22 12:04 nileshgulia1

Updated

erral avatar Apr 14 '22 17:04 erral

@jenkins-plone-org please run jobs

erral avatar May 12 '22 13:05 erral

I think we need the plone.volto counterpart (GS config to make sure that no classic URLs are leaked there).

sneridagh avatar May 22 '22 09:05 sneridagh

Deploy Preview for plone-restapi canceled.

Name Link
Latest commit 6539dc94684c3f321992929bc6f987003460aa90
Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/630dc24583e09300085d3845

netlify[bot] avatar Jun 29 '22 07:06 netlify[bot]

@jenkins-plone-org please run jobs

nileshgulia1 avatar Jun 29 '22 08:06 nileshgulia1

@tisto Please have a look.

avoinea avatar Jul 01 '22 14:07 avoinea

@jenkins-plone-org please run jobs

nileshgulia1 avatar Aug 31 '22 10:08 nileshgulia1

@jensens @tisto What's the status here? Can we move on with this one, please?

avoinea avatar Sep 01 '22 11:09 avoinea

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

nileshgulia1 avatar Sep 02 '22 06:09 nileshgulia1