I want to extend
plone.restapi serialization to allow selection of per-request serializer selection as follows:
- if a
GETrequest for a page passes a parameter
richtext=rawis passed in querystring, and
collective.exportimportis installed, a subscriber to a publication event (e.g.
IPubAfterTraversal), mark request object with
collective.exportimport.interfaces.IRawRichTextMarker— expected result should be raw stored text from rich text field, untransformed.
GETrequest for a page passes parameter
richtext=mycustomthing(or similar), I likewise mark a custom marker interface to trigger use of a custom serializer of my own construction.
My larger goal is having text authored in Plone, exposed over
GET request via
plone.restapi but suitable for consumption in multiple other systems — with the idea that extending an out-of-the-box API is preferable design to maintaining custom views that do the same thing. I want to double-check that I am not missing some more obvious extension mechanism to pivot serialization per-request in