The annoyance is that Resource has 8 methods when most users only implement 2 (id + attributes).
- Keep Resource with only the resource-level methods: resolveResourceId, resolveAttributes, resolveResourceLinks, resolveResourceMeta
- Move the 4 document-level methods to a DocumentCustomizer<RESOURCE_DTO> interface that users can optionally implement — either on the same class or a separate one
- The framework checks if the Resource also implements DocumentCustomizer and uses it; otherwise falls back the defaults
This preserves the simple mental model (you still just implement Resource), doesn't require a new annotation, and cleanly separates the concerns for users who do need customization.
The annoyance is that Resource has 8 methods when most users only implement 2 (id + attributes).
This preserves the simple mental model (you still just implement Resource), doesn't require a new annotation, and cleanly separates the concerns for users who do need customization.