[Breaking change]: Delivery API media models and controller namespaces will be changed in Umbraco 13 #11
Labels
category/binary-incompatible
Existing binaries may encounter a breaking change in behavior.
category/breaking
category/source-incompatible
Source code may encounter a breaking change in behavior when targeting the new version.
cms/release/13.0.0
Description
Umbraco 12.2 ships with the Media Delivery API to complement the Content Delivery API. While building the Media Delivery API, certain compromises were made to keep Umbraco 12.2 backwards compatible.
These compromises will be addressed in Umbraco 13.
Version
Umbraco 13
Previous behavior
MediaPickerWithCropsValueConverter
and theIApiMediaWithCropsBuilder
service would return instances of the concrete classApiMediaWithCrops
.ApiMediaWithCrops
reused models for crops and focal points from the default MediaPicker3 value type.ApiMediaWithCropsResponse
.Umbraco.Cms.Api.Delivery.Controllers
).New behavior
MediaPickerWithCropsValueConverter
andIApiMediaWithCropsBuilder
returns instances of the interfaceIApiMediaWithCrops
.IApiMediaWithCrops
-ImageCrop
andImageFocalPoint
respectively.IApiMediaWithCropsResponse
.Umbraco.Cms.Api.Delivery.Controllers.Content
.Umbraco.Cms.Api.Delivery.Controllers.Media
.IApiMediaWithCrops
andIApiMediaWithCropsResponse
are new interfaces introduced in Umbraco 13.As part of this change,
ApiMediaWithCrops
andApiMediaWithCropsResponse
are madeinternal
.Type of breaking change
Reason for change
This change aligns the modelling of the Media Delivery API with that of the Content Delivery API. Furthermore, this change allows for greater flexibility in customising the output of media items within both APIs.
The controller namespace changes create a better structure and foundation for future development of the Delivery API.
Recommended action
Use the new interfaces instead of the concrete classes.
Adjust namespaces if any Delivery API controllers have been referenced.
Affected APIs
MediaPickerWithCropsValueConverter
IApiMediaWithCropsBuilder
ByIdContentApiController
ByIdsContentApiController
ByRouteContentApiController
QueryContentApiController
ByIdMediaApiController
ByIdsMediaApiController
ByPathMediaApiController
QueryMediaApiController
The text was updated successfully, but these errors were encountered: