Closed tisto closed 1 year ago
@sneridagh @davisagli I am unsure if we can remove allowing passing "token" instead of "tokens" parameter. Can you folks check if we do this properly in Volto 15, 16 and 17?
@sneridagh @davisagli does this mean that Volto currently sends both "token" and "tokens"?
@tisto That particular code just passes through what was passed in to the request (token or tokens or both). You have to look at where that redux action is used
@sneridagh could you have a look at what we currently use in Volto 16 and 17? token or tokens? Dependent on what we use I'd make a decision on what to do...
@tisto we allow both, for backwards compat.
I don't know if we should remove the dual code from Volto as well... I'd leave it.
@sneridagh I'd say we remove "token" from plone.restapi 9 and deprecate it in Volto 17. We can then remove it in Volto 18. Otherwise, we risk incompatibilities between Volto and plone.restapi that are unnecessary.
@sneridagh @tisto Currently volto can use either token
or tokens
, depending on whether the value is an array or not. I would personally prefer to keep supporting both in plone.restapi. I don't see a compelling reason to remove one of them. It would break compatibility of plone.restapi 10 with volto <17, and just make extra work for ourselves.
I also share the same feeling as David... it does not hurt, we document/use in code (the locations are also very localized, meaning they are not spreaded everywhere) just one.
Done in #1708
Passing a token parameter to the vocabularies endpoint has been deprecated:
https://github.com/plone/plone.restapi/blob/eac02a701a42fd5853f9ec4b62d2d17dec283186/src/plone/restapi/serializer/vocabularies.py#L46
One should use "tokens" instead.