Problem/Motivation

Different resources return differently shaped payloads, and error responses vary between plugins. Clients must special-case each endpoint, and the OpenAPI specification cannot describe a common error type.

Proposed resolution

  • Define a documented response envelope (data, meta, errors) and apply it consistently.
  • Use a single error format with a machine-readable code, message and optional violation list.
  • Provide a compatibility toggle so existing consumers can keep the legacy shape during migration.

Remaining tasks

Agree the envelope, implement it in MyrestResourceBase, and update all plugins.

User interface changes

Optional compatibility toggle in the settings form.

API changes

Response shape changes when the new envelope is enabled.

Issue fork myrest-3616437

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 cf27ebac on 1.0.x
    Issue #3616437: Add the data/meta/errors response envelope behind a...
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)