laminas-api-tools/api-tools-admin

The metadata map is being re-populated on updates to the service

michalbundyra opened this issue · 2 comments

This causes issues with resources returning Json representations.

weierophinney:

@jdelisle Yes, please open an issue on zfcampus/zf-apigility-admin; basically, we shouldn't be re-populating the metadata map on updates to the service, and that's the problem you're having.

See zfcampus/zf-hal#38


Originally posted by @jdelisle at zfcampus/zf-apigility-admin#209

This will be harder than I thought to achieve. We actually do need to repopulate the metadata map in instances where the entity or collection are changed, or the hydrator. I'm not sure if we'll be able to resolve this; we may need to instead document workarounds.


Originally posted by @weierophinney at zfcampus/zf-apigility-admin#209 (comment)

Okay, I'm going to go back to the alternative you suggested in zfcampus/zf-hal#38 (comment):

Create a different entity type in your service [than the one defined in the metadata map], and make sure your resource class returns entities using that type.


Originally posted by @jdelisle at zfcampus/zf-apigility-admin#209 (comment)