Skip to content

Validation error when field is nullable and consumer sends in a null value #183

Closed
@ddobrin

Description

@ddobrin

When an OpenAPI specification declares an enum, and specifies it as being nullable, the consumer can send the values:
{...
field: null
...}

The validator identifies it correctly as nullable, however proceeds to look for null as a value in the enumerated fields.

It is a delta between OpenAPI and JSONSchema specifications:
-- https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values
-- http://spec.openapis.org/oas/v3.0.2

The issue can be fixed in a configurable manner in the validator without impacting performance

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions