-
-
Notifications
You must be signed in to change notification settings - Fork 888
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to generate IRI when using non-resource DTO as response #3090
Comments
MyEntity is missing an item get operation related: api-platform/docs#886, #3112, #3051 |
Thanks for the help so far! Actually, the full annotation reads:
So there is a get itemOperation (for persisted entities). The setup that worked for us was:
That no longer works. What I can do is generate a UUID for the "volatile" entity, the response will then contain a reference to an entity that does not exist. In v2.4.0-beta.2, the returned DTO was not accompanied by an IRI. It seems wrong to generate and return an IRI to an entity that was not persisted. It might be acceptable for our use-case, but is that how this is supposed to work? |
This is working for me. Just decorate
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
We're still running v2.4.0-beta.2 and have a problem upgrading to v2.4.0 or higher.
I'm using a custom operation on an entity:
This works fine in v2.4.0-beta.2: we post an entity to the endpoint, our transformer performs some logic and returns a DTO, the DTO gets serialized and is returned as response.
Upgrading to any version above v2.4.0-beta.2 results in API platform trying to generate an IRI for the entity:
I'm unable to figure out the culprit, is this a bug in all versions of API platform above 2.4.0-beta2 or has something changed in the way non-resource responses should be implemented?
Following is a stack trace of the exception:
Seems related to #2910 and #2860
The text was updated successfully, but these errors were encountered: