NelmioApiDocBundle
NelmioApiDocBundle copied to clipboard
Doc not rendering private/protected properties from traits
Hi,
I've setup a CustomUser
entity that uses a couple of traits that includes some properties (These properties are set as protected
). Then created a controller with this attributes:
#[OA\Response(
response: 200,
description: 'Returns a custom user',
content: new Model(type: CustomUser::class)
)]
But the generated swagger documentation is not including the trait properties in the object schema unless this properties are set as public. The rest of the properties that are directly in the CustomUser
class are private and work fine.
Am I doing something wrong?
PD: Symfony 5.4 + PHP 8.1 + nelmio 4.11.1