Problem/Motivation

The decision taken for this module is that every field of a bundle is exposed. A field whose type has no shape is still returned — as the raw value Drupal gives — and is simultaneously recorded as needing a handler. Dropping it instead would lose data silently, and the person affected finds out only when the front end shows nothing.

Proposed resolution

  • A raw shape that returns the field values as the typed data API gives them, with anything unserializable removed rather than fataling.
  • Every use of it records an entry for the change queue: this bundle, this field, this type, no handler assigned.
  • A site switch include_unmapped, default TRUE, that drops unmapped fields from the response for sites that want the narrow shape.
  • A blacklist by field name and by pattern, defaulting to the obviously non-public — field_internal_*, field_admin_*, password and token fields — and visible in the UI so that what is hidden is known.

Remaining tasks

Everything.

Issue fork myrest-3620327

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed 2fc21525 on 1.0.x
    Issue #3620327: Add the raw shape and make an unmapped field visible...
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)