Open c-schinzer opened 3 years ago
Hint: Use ./bin/console nelmio:apidoc:dump
in your local environment to debug your annotated RestControllers in your dev environment. Kudos to the Nelmio devs for that feature. It saves a ton of time and I got aware only when digging deep here.
It appears the issue is with the double definition of the path through @Rest\Route()
annotation and the separate path=
statement on the @OA\Get()
annotation. Skipping the extra statement for path removes the error for this file.
This is actually quite odd and should not be happening. But it may just be that you're using an outdated version of NelmioApiDocBundle, could you try upgrading to the latest version of NelmioApiDocBundle v4?
I do observe several issues when running Nelmio API Doc along with FOS Rest Bundle in the context of Symfony 4.4; when switching to http://mysite/api/doc I get a Symfon ErrorException as follows:
Current versions:
Now this message for me has several issues:
Why does Symfony render a blocking
ErrorException
from aUser Warning
? I would have expected Warning Level, but still a rendering of the doc page.In my code the row referenced in the Warning message and mentioned to be Skipped looks like this:
Hence nothing particular to be skipped I would say in the middle of a Parameter definition. Is the referenced line 82 correct? Is it possibly just the same line as referenced in the previous 'Using:' message? That would represent a tiny but relevant bug as it does not give the expected guidance to the programmer on what will be skipped.
The Warning as such for me is unclear and possibly a bug as this very file declares the following two methods:
So there are two GET methods, with similar but not equal paths. I checked the codebase and there is no other place where routes for
/subjects/dnsendpoints
are used or declared. I am uncertain about the overlap and thus potential concurrence betweem the@Rest
and the@OA
annotations, though.Can anyone shed some light into this? Any hint is gratefully appreciated :)
Carsten