Problem/Motivation
In #2835767: Media + REST: comprehensive test coverage for Media + MediaType entity types, we excluded the Media module's entities from being exposed as REST resources. We did that because while a lot of effort had been put in making sure the Media entity was rock solid for 8.4.0, no attention had been paid at all yet to the normalization (and serialization) of Media entities.
Rather than causing regressions and BC breaks in the future by needing to fix the normalizations of the Media module's entities, we chose to limit the API surface. Which means we'll be able to ship a well-considered normalization of Media & Media Type entities, and not cause BC breaks.
At #2835767-38: Media + REST: comprehensive test coverage for Media + MediaType entity types, it was decided to ship the current Media module entities' normalization (primarily to provide a stable upgrade path from Media in contrib), and warn in the release notes that they're bound to change. In this issue, we should decide how we need that normalization to evolve.
Proposed resolution
TBD
Remaining tasks
User interface changes
None.
API changes
None: only API addition.
Data model changes
None.
Comments
Comment #2
Wim LeersAs of #2835767-44: Media + REST: comprehensive test coverage for Media + MediaType entity types, #2835767 changed direction. Updated this IS accordingly.
Comment #3
xjmNote that I think this should be directly postponed on #2825487: Fix normalization of File entities: file entities should expose the file URL as a computed property on the 'uri' base field as well.
Comment #4
Wim LeersDone. Also posted that at #2825487-78: Fix normalization of File entities: file entities should expose the file URL as a computed property on the 'uri' base field.
Comment #5
Wim Leers#2825487: Fix normalization of File entities: file entities should expose the file URL as a computed property on the 'uri' base field is itself also postponed on an issue (#2871591: Allow ComplexData in TypedData to specify computed properties that should be exposed in normalization and other contexts), so postponing this on that too.
Comment #6
Wim LeersNote that I don't fully agree with #3 — I think there are things we could already work on and discuss. But I do agree that at the very least, #2825487: Fix normalization of File entities: file entities should expose the file URL as a computed property on the 'uri' base field may set the necessary precedent that will help guide this to the right place.
Comment #8
chr.fritsch#2871591: Allow ComplexData in TypedData to specify computed properties that should be exposed in normalization and other contexts landed, so this is coming closer.
Comment #9
chr.fritsch#2825487: Fix normalization of File entities: file entities should expose the file URL as a computed property on the 'uri' base field landed. Unblocked