Skip to content
Advertisement

api platform – Unable to generate an IRI for the item

I’m starting with API Platform and I’m using the example entity “Foo”:

JavaScript

I succesfully see the new Entity in dashboard (See image):

API Platform Dhasboard

And I had the following error when I try to get all Foo collection:

JavaScript

I tried different formats and check the the routes too:

JavaScript

It’s possible what I need some special library in my server? What I’m doing wrong?

Thanks in advance!

Advertisement

Answer

You’re missing a getter for your id

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement