Problem/Motivation

Generated code is specific to the site it was generated for, and this module's repository is published on drupal.org. Writing generated plugins inside the module would put one site's content model into a public release, and would make the module's own repository dirty after every scan.

Proposed resolution

  • The generator writes into a neighbouring module — myrest_generated by default, the name configurable — creating it if it does not exist, with its info file and namespace.
  • The target directory is configurable and validated as writable before anything is written; a read-only filesystem must produce a clear message, not a half-written module.
  • Writes are atomic per run: either the whole set lands or nothing does, so an interrupted generation cannot leave a site with half a routing table.
  • The module ships with a README saying what it is, that it is generated, and where to put custom code instead.

Remaining tasks

Everything.

Issue fork myrest-3621657

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’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)