Create a custom DataType and normalizer for uri.

Created on 1 January 2024, 12 months ago
Updated 15 March 2024, 9 months ago

Problem/Motivation

We are currently adding a computed property for the aliased url property and it's output as sibling to original uri value. It's a bit unintuitive and inconsistent with standard uri output in what users would expect from jsonapi.

Steps to reproduce

Add a uri custom field to field and set a value for it in sample entity. Observe the output in jsonapi that provides a separate property for alias as sibling to original value.

Proposed resolution

Create a custom DataType and Normalizer plugin for uri and return the jsonapi output as an array containing uri & url.
Remove existing computed property and apply new data type as replacement in the properties declaration.

Remaining tasks

Patch forthcoming.

User interface changes

n/a

API changes

Values in jsonapi for uri will now be returned as object containing uri and url vs. a simple string.

Data model changes

uri property definition will be using the new DataTypeDefinition.

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States apmsooner

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024