Problem/Motivation

Currently, you have to manually validate the request objects in the controller. We could probably automate this by validating requests during argument resolving and throwing an ApiValidationException in case of validation errors.

Possible error conditions when mapping data:

  • Validation errors will result in HTTP 422 error responses (including a serialized ConstraintViolationList object)
  • Malformed data will be responded to with HTTP 400 error responses
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

DieterHolvoet created an issue. See original summary.

dieterholvoet’s picture

Issue summary: View changes
dieterholvoet’s picture

Issue summary: View changes

dieterholvoet’s picture

Status: Active » Needs review

  • DieterHolvoet committed 62f3644f on 1.x
    Issue #3285011 by DieterHolvoet: Automatically validate requests during...
dieterholvoet’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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