api/doc page results in error after defining Groups annotation in Entity:
{"error":{"code":500,"message":"Internal Server Error","exception":[{"message":"Warning: Illegal offset type in isset or empty","class":"ErrorException","trace"
There is something suspicious going on this line:
https://github.com/nelmio/NelmioApiDocBundle/blob/a356221c6769988712295a16bc5896b8265e8029/ModelDescriber/ObjectModelDescriber.php#L66
$groups - this is actually a numerical-key array of groups from SWG annotation in controller
$property - while this is an instance of object(EXSystComponentSwaggerSchema)
PS Unfortunately have no time for further investigation. Will switch to JMS
You're right, I don't know how we ended up using $property, it should be $propertyName. Will try to submit a fix.
Hello, when the problem will be corrected?
when somebody has time to do it, i guess. you are welcome to send a pull request. this is open source and people work on it in their free time...
I do not think it is a fix, because groups variable are number ordered array that is contsructed from controller's annotation group.
I believe that fix should contain fetching groups from target property and performing array_intersect between groups defined in controller and model
Seems like this exists on latest stable 3.2.0 when is the next release coming?
I just released v3.2.1 containing this fix https://github.com/nelmio/NelmioApiDocBundle/releases/tag/v3.2.1.
@GuilhemN thanks!
Thanks @GuilhemN (and all others involved)
Most helpful comment
I just released v3.2.1 containing this fix https://github.com/nelmio/NelmioApiDocBundle/releases/tag/v3.2.1.