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
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
Comment #4
sergeydruua commentedComment #6
sergeydruua commented