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
Because the default mime type is inspected at api startup and a custom representation class can be overridden on a per-resource basis (which doesn't necessarily have to implement the global default mime type), an exception would be thrown if the override representation class doesn't implement the default mime and none is specified.
The text was updated successfully, but these errors were encountered:
Does this issue also cover the reverse case where a custom representation specified in a resource implements a mime type that is not implemented by the default representation class, and the API doesn't recognize the additional mime type for requests to that resource?
I think one solution to this might be an additional argument to the representationOf method. In addition to passing in the data and the custom representation class, you would specify the format that should be used (unless the class only implements one).
After much thought, I've decided that custom representation class overrides are just a bad idea. They create more problems than they solve (do they solve any problems at all?!) and trying to work around this problem born of this abortion of a feature is just not worth it.
Instead of representation class overrides, just put every supported return format into one representation class. Problem solved!
If anyone can provide a valid use-case for overrides then we can re-open this ticket. Otherwise, consider this feature deprecated in 1.1 and slated to be removed in 2.0.
Because the default mime type is inspected at api startup and a custom representation class can be overridden on a per-resource basis (which doesn't necessarily have to implement the global default mime type), an exception would be thrown if the override representation class doesn't implement the default mime and none is specified.
The text was updated successfully, but these errors were encountered: