Schema Validator doesn't allow empty array as valid JSON

Created on 24 June 2024, 10 months ago

Problem/Motivation

Steps to reproduce

Use the value `[]`. JSON:API throws:

```
"detail": "Adaptor Drupal\\jsonapi_extras\\Plugin\\ResourceFieldEnhancerBase returned invalid output data: []",
```

Proposed resolution

change to `anyOf` instead of `oneOf`. I guess because an empty array is an object too?

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.3

Component

Code

Created by

🇺🇸United States oknate Greater New York City Area

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

Comments & Activities

Production build 0.71.5 2024