Problem/Motivation

A generated class declares a structure id; the structure itself is configuration. If the two are produced by different runs or land in different places, a site ends up with a class pointing at a structure that does not exist — a 500 on an endpoint that looked fine in review.

Proposed resolution

  • Emit the structure and endpoint entities in the same run as the classes, into the site's configuration.
  • Respect what a person already changed: a property whose shape or key was set by hand is not reset to the default on the next run — editing the structure is the cheapest sanctioned way to change a response.
  • Record on each generated property whether it came from the generator or from a person, which is what makes the previous point possible.
  • The pair is atomic: classes and configuration land together or not at all.

Remaining tasks

Everything.

Issue fork myrest-3622006

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 44d859de on 1.0.x
    Issue #3622006: Generate the structure configuration alongside the...
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)