Api Platform 3.3.8 introduce the the new _api_disable_swagger_provider
flag inside extraProperties (see the commit). Inspired by the test found in the commit, I tried to use it here :
#[ORMEntity(repositoryClass: UserRepository::class)]
#[ORMTable(name: '`user`')]
#[ORMUniqueConstraint(name: 'UNIQ_IDENTIFIER_EMAIL', fields: ['email'])]
#[ApiResource(operations: [
new Get(),
new GetCollection(),
new Post(),
new Put(),
new Patch(),
new Delete(),
new Get(
name: 'user_activate',
read: false,
uriTemplate: '/users/activate/{token}',
controller: ActivationController::class . '::activate',
openapiContext: [
[...]
],
extraProperties: [
'_api_disable_swagger_provider' => true,
],
),
new Post(
[...]
),
])]
class User implements UserInterface, PasswordAuthenticatedUserInterface
[...]
It does not work, I don’t know why. I find no error any where, just a 404 response, from Swagger…
Anyone can help ?
I emptied the cache, restarted the server, asked the question on Github, look at all logs…