Registration of adapter:
<subscriber factory=".blocks.TextBlockConverter" provides="plone.restapi.interfaces.IBlockDeserializer" />
What it looks like:
@implementer(IBlockDeserializer)
@adapter(IBlocks, IBrowserRequest)
class TextBlockConverter(object):
order = 100
block_field_name = "text"
def __call__(self):
""
How they are discovered:
zope.component.subscribers([self.context, self.request], IBlockDeserializer)
The alternative is to declare them the same:
But to register with a unique name that doesn't match anything else (or there's a ZCA conflict):
They would be discovered as: