dedoc / scramble

Modern Laravel OpenAPI (Swagger) documentation generator. No PHPDoc annotations required.
https://scramble.dedoc.co/
MIT License
1.18k stars 112 forks source link

Failure to understand model.property type #525

Closed benascbr closed 3 weeks ago

benascbr commented 3 weeks ago

https://github.com/dedoc/demo-scramble

Added:

/**
 * @mixin Booking
 */

Above class BookingResource extends JsonResource

            'type' => $this->type,

Below 'id' => $this->id,

 /**
 * @property int $type
 */

Above class Booking extends Model

Actual type string

Expected type integer

image

romalytvynenko commented 3 weeks ago

@benascbr This is the expected behavior for now as Scramble uses real types of columns in the database and casts, if exist to determine column type.

benascbr commented 3 weeks ago

@romalytvynenko understood