api-platform / admin

A beautiful and fully-featured administration interface builder for hypermedia APIs
https://api-platform.com/docs/admin/
MIT License
481 stars 130 forks source link

feat: register the resource with the correct operations #455

Closed alanpoulain closed 2 years ago

alanpoulain commented 2 years ago
Q A
Branch? main
Tickets Fixes #441
License MIT
Doc PR N/A

The operations were not taken into account. For instance if a resource doesn't have a POST path, the create operation will be disabled: the create button will not be displayed in the list.

The admin does it by doing an introspection in the ResourceGuesser component (it was not the case before) and by registering again (the first registration is done with the registerResource static method) the resource with the correct operations.