Problem/Motivation
When you try to create an entity through REST and it doesn't have defined a canonical URL, it returns:
No link template "canonical" found for the "paragraph" entity type.
Proposed resolution
The Post method from EntityResource assumes that the created entity has an url and try to return it:
$url = $entity->urlInfo('canonical', ['absolute' => TRUE])->toString(TRUE);
return new ModifiedResourceResponse($entity, 201, ['Location' => $url->getGeneratedUrl()]);
The attached patch checks first it there is a canonical URL.
Remaining tasks
* Review
User interface changes
None
API changes
Post method for entity resource shouldnt try to return the entity URL if it doesnt have one.
Data model changes
None