Compatibility with jsonapi?

Created on 11 May 2021, about 3 years ago
Updated 5 July 2023, 12 months ago

This module seems very interesting -- a very interesting approach. Curious if this has been tested with JSON:API as well? I understand that computed fields are not well supported by JSON:API filters, so I was curious about whether or not this is an issue given the way it seems to be reusing fields. Haven't tested it yet myself, but was curious about whether or not it had already been explored?

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States matt_paz

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

Comments & Activities

Not all content is available!

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

  • πŸ‡¨πŸ‡΄Colombia camilo.escobar

    I found that when an inheritance is configured for a field of type "List (text)" allowing multiple selections, the resulting inherited values are not exposed correctly by JSON:API. While an array is expected containing all the selected values, only one of the values is exposed as a string.

    Steps:

    1. Have a field of type "List (text)" allowing multiple selections in both the source bundle and the destination bundle. Example, I created a field on each bundle with the following allowed values:
    • option_1|Option 1
    • option_2|Option 2
    • option_3|Option 3
  • Configure a field inheritance for both fields, using the "Fallback" strategy
  • Results:
    The inheritance seems to work well: If I select multiple values (say option_1 and option_3) for the field in the target or the destination entity, I can see the resulting inherited values are correct when they are displayed in the destination entity detail page.

    But, when I request the destination entity via JSON:API, I get this:

    "inherited_multi_select_list": "option_1",
    

    whereas this is the expectation:

    "inherited_multi_select_list": [
      "option_1",
      "option_3"
    ]
    
Production build 0.69.0 2024