You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #1850 we proposed to move the Jackson annotations from the LinkImpl to the Link interface as the schema the model exports belongs to the API of a component, for example the Button component.
This is currently handled differently for some cases. The following interface provide the Jackson annotations as part of their API, for example:
Should we streamline the approach to
a) either declare all Jackson annotations on the interfaces (ConsumerType) / APIs or
b) remove them from all and move them to the implementation?
In the later case I see the risk that consumers (javascript for example) rely on an implementation detail that can change at any point of time, and if we decide to go that way we must document it. Furthermore custom serializers should be moved to exported packages so that custom components can implement the same schema, the WCM Core Components do, even though there is no contract to keep it compatible with that.
If we decide to move the JSON annotation to the interface, each component may document its JSON schema.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In #1850 we proposed to move the Jackson annotations from the
LinkImpl
to theLink
interface as the schema the model exports belongs to the API of a component, for example the Button component.This is currently handled differently for some cases. The following interface provide the Jackson annotations as part of their API, for example:
Others don't.
Should we streamline the approach to
a) either declare all Jackson annotations on the interfaces (ConsumerType) / APIs or
b) remove them from all and move them to the implementation?
In the later case I see the risk that consumers (javascript for example) rely on an implementation detail that can change at any point of time, and if we decide to go that way we must document it. Furthermore custom serializers should be moved to exported packages so that custom components can implement the same schema, the WCM Core Components do, even though there is no contract to keep it compatible with that.
If we decide to move the JSON annotation to the interface, each component may document its JSON schema.
Beta Was this translation helpful? Give feedback.
All reactions