Problem/Motivation

Form submission endpoints exist on all three sites, differ only in which form and which fields, and carry the module's most security-sensitive code: validation, flood control and mail. They also carry an undeclared dependency — the core does not store contact messages, so a site that expects to find them in the database finds ContentEntityNullStorage.

Proposed resolution

  • MyrestContactFormResourceBase declaring the form id, the payload-to-field map, the required fields and the mail behaviour, with everything else in the base.
  • Validation and sanitisation through the mechanisms the module already has, and the same flood control.
  • The storage question answered explicitly: whether submissions are stored, and if so where, said in the documentation rather than assumed.
  • The request body examples kept working — getOpenapiBodyExample() stays part of the contract.

Remaining tasks

Everything.

Issue fork myrest-3621300

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 d031f47a on 1.0.x
    Issue #3621300: Add the contact form submission resource base class
    
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)