Description
API Platform version(s) affected: 4.1.7
Description
When I want to use operations on my read-only resource, I get an error like this:
Cannot find the class related to https://localhost/docs.jsonld#Entrypoint/greeting.
How to reproduce
This error can be reproduced as I described in this related issue: api-platform/api-platform#2870
Possible Solution
I don't know all the intricacies, but it would be nice to be able to handle read-only resources. It might be worth considering an option where, for a minimal check of the availability of a resource for parsing, there is a new GetCollection()
operation, not a new Post()
.
Additional Context
I researched this issue myself and found that this parser for Hydra only works in two cases: when the "operations" attribute is not defined (i.e. all default operations are available), or when among the defined operations there is an operation to create a resource (i.e. new Post()
).
As I understand it, the creation method is currently a fallback: