Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#615 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript
Domain
api, frontend

Research direction

Reproduce the issue in a fresh API Platform v4 installation using the Greeting resource with only GET and GET Collection operations. Trace how the Admin UI handles the API entrypoint with Hydra prefixes disabled and enabled. Done means the Admin UI works without a POST operation and without requiring Hydra prefixes to be enabled.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
516
Forks
134
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from api-platform/admin

All issues in api-platform/admin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.