In several of our projects, our DTOs often times contain properties that (for different reasons) should be exluded from the generated schema. It would be great to have an easy way, e.g. a Nelmio #[IgnoreFromSchema] attribute, to ignore those properties.
Possible solutions not working for us:
Excluding specific properties using Symfony's #[Ignore] attribute as this leads to unintended side effects in other places where the serializer is used
Applying the #[OA\Property(readOnly: true)] property as this still includes the property in the request body schema for a POST endpoint, for example
Description
In several of our projects, our DTOs often times contain properties that (for different reasons) should be exluded from the generated schema. It would be great to have an easy way, e.g. a Nelmio
#[IgnoreFromSchema]
attribute, to ignore those properties.Possible solutions not working for us:
#[Ignore]
attribute as this leads to unintended side effects in other places where the serializer is used#[OA\Property(readOnly: true)]
property as this still includes the property in the request body schema for aPOST
endpoint, for exampleAdditional context
/