Skip to content

Admin throws error "Cannot find the class related to [Entrypoint/RESOURCE_NAME]" if POST operation is removed from ApiResource #615

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

Open
enridelg opened this issue Apr 9, 2025 · 0 comments

Comments

@enridelg
Copy link

enridelg commented Apr 9, 2025

API Platform version(s) affected: 4.0.6

Description
When I remove the POST operation from an ApiResource, the Admin UI throws the following error:
Cannot find the class related to https://localhost/api/docs.jsonld#Entrypoint/[RESOURCE_NAME]
Enabling Hydra prefixes in the API Platform config (which is disabled by default in v4) resolves the issue with the same resource operations.

How to reproduce
In a fresh install of API Platform (v4.x), modify the Greeting resource to only include GET and GET Collection operations:

#[ApiResource(operations: [new Get(), new GetCollection()])]

Expected behavior
The Admin UI should work even if the POST operation is removed from the resource, and without requiring Hydra to be explicitly enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant