Allow null value for non-required fields (json schema)

Created on 3 April 2018, over 6 years ago
Updated 6 August 2024, 4 months ago

I am getting json schema validation errors when an entity is missing a value in a field. An example error message is:

{
    "property": "attributes.abbreviation",
    "pointer": "\/attributes\/abbreviation",
    "message": "NULL value found, but a string is required",
    "constraint": "type",
    "context": 1
},

Where "abbreviation" is a field in our site (renamed by the jsonapi_extras module, by the way) which is not required, and so will sometimes be null.

Would it make sense to put some allowance in this module for this case?

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States brockfanning

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024