You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my Symfony application, I have a controller which returns an output. Fields in this output which are not nullable are required in the OpenAPI documentation expect my nullable field in the same class (attribute3). Strange thing is that they are all in the constructor.
In my opinion, the required for attribute3 is missing.
Don't know if it's a bug. Here is the code.
This is the Output class in my API.
final readonly classMyOutput
{
publicfunction__construct(
publicstring$attribute1,
publicstring$attribute2,
public ?string$attribute3,
) {
}
In my Symfony application, I have a controller which returns an output. Fields in this output which are not nullable are required in the OpenAPI documentation expect my nullable field in the same class (
attribute3
). Strange thing is that they are all in the constructor.In my opinion, the
required
forattribute3
is missing.Don't know if it's a bug. Here is the code.
This is the Output class in my API.
This is the code in my controller :
In my OpenAPI documentation:
The text was updated successfully, but these errors were encountered: