Field marked as "nullable: true" / "required: false" fails because the field is null

Issue #249 resolved
Sven Döring created an issue

Might be related to #209.

A field is declared as array and additionally marked with "nullable": true but the validation fails because the field is send with null.

Instance type (null) does not match any allowed primitive type (allowed: ["array"])"

It is not set as required field in the object definition and the flag "required": true is ignored, too.

Comments (2)

  1. Sven Döring reporter

    Damn. nullable is only supported with OpenAPI 3 and I still use Swagger (OAI2).

    With OpenAPI 3 I do not get the error and all is working fine.

  2. Log in to comment