Problem/Motivation
Content type identifiers such as article, news, doctor, discount, package, video, before_after and page are hardcoded throughout the helper and REST resources. This makes the endpoints unusable on sites with a different content model.
Proposed resolution
- Add a bundle-mapping configuration object alongside the field mapping.
- Let each resource plugin declare the bundle it serves through its plugin definition rather than inline literals.
- Skip resource registration when the configured bundle does not exist on the site.
Remaining tasks
Introduce the mapping, refactor resources, and document the defaults in README.
User interface changes
New bundle-mapping section in the module settings.
API changes
Resource plugins resolve bundles from configuration.
Issue fork myrest-3615410
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
Comment #4
sergeydruua commentedComment #6
sergeydruua commented