hotmeteor / spectator

OpenAPI testing for PHP
MIT License
285 stars 52 forks source link

integer? <== The data (null) must match the type #145

Closed ronaldwanink closed 7 months ago

ronaldwanink commented 1 year ago

I keep on getting issues like y*: integer? <== The data (null) must match the type: integer when y is part of an object in an array.

I know this exists, but somehow I cannot get rid of the error.

Update:

I even get this problem in simple situations (but somehow not always in similar situations):

array <== All array items must match schema
    object <== The properties must match schema: product_id
        id*: integer
        product_id: integer? <== The data (null) must match the type: integer

(OpenAPI 3.0, Laravel 10, latest build)

morcano commented 1 year ago

+1

absoftware commented 10 months ago

+1, but switching to OpenAPI 3.1 helped me... also I have temporary fix for OpenAPI 3.0 https://github.com/hotmeteor/spectator/issues/68#issuecomment-1811527485