Problem/Motivation

The scanner reads and decides nothing; the generator writes and decides nothing. Every decision — which bundles get which kinds of endpoint, which field maps to which key with which shape, which conventions apply — belongs to one component in between, so that the decisions are reviewable in one place and testable without touching the filesystem.

Proposed resolution

  • A Planner service: ModelMap plus rules plus the site profile plus manual overrides in, Blueprint out.
  • The Blueprint is data — the list of endpoints with their kind, path, plugin id and structure, and the structures with their properties — and nothing in it is a file path.
  • The default rules written down as data too, not as conditionals: a bundle with a canonical route gets a detail endpoint, a bundle with more than N entities gets a listing, a vocabulary gets a term list.
  • Manual overrides always win over the rules, and the Blueprint records which decision came from where — needed by the UI to show why an endpoint exists.
  • Unit tests over fixture maps; no site, no database.

Remaining tasks

Everything.

Issue fork myrest-3621429

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 47f6c8c7 on 1.0.x
    Issue #3621429: Build the planner that turns a ModelMap into a Blueprint
    
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)