Every entity reference is currently labeled as Resource Identifier in the json schema, see

        revision_uid: {
          type: 'object',
          properties: {
            data: {
              type: 'object',
              required: ['type', 'id'],
              properties: {
                type: {
                  type: 'string',
                  title: 'Referenced resource',
                  enum: ['user--user'],
                },
                id: {
                  type: 'string',
                  title: 'Resource ID',
                  format: 'uuid',
                  maxLength: 128,
                },
              },
            },
          },
          title: 'Resource Identifier',

as example

It would be nice to actually have the field label used here

Comments

dawehner created an issue. See original summary.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new691 bytes
e0ipso’s picture

@dawehner I like this. Are all the references ensured to have that method?

dawehner’s picture

Thank you for your quick feedback @e0ipso

protected function normalizeRelationship(FieldDefinitionInterface $field_definition) { is the signature we are looking at and that interface has the method on it.
In other words, yes :)

e0ipso’s picture

Status: Needs review » Fixed

Fixed! Thanks!

  • e0ipso committed d81bcbf on 8.x-1.x authored by dawehner
    Issue #2987199 by dawehner, e0ipso: Take the field label into account...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.