swagger-php icon indicating copy to clipboard operation
swagger-php copied to clipboard

If a type of a defined property is nullable, nullable attribute should be added to the generated Doc

Open emulgeator opened this issue 2 years ago • 1 comments

Probably this is more like a feature request.

For example when the property is defined like this:

#[OA\Property(description: 'Name')]
public readonly ?int $name;

The following should be generated into the documentation:

"name": {
    "description": "Name",
    "type": "integer",
    "nullable": true
}

emulgeator avatar Dec 05 '22 13:12 emulgeator

Yes, this is a good one. #1310 will cover that, although that is slow going at the moment (mostly stalled, to be honest :/)

DerManoMann avatar Dec 06 '22 02:12 DerManoMann