I’ve been building a mock of Drupal’s decoupled APIs, for testing a frontend without a Drupal site. One command serves the Umami demo:
npx decoupled-drupal-mock-umami@alpha --port 3005
- JSON:API, Decoupled Router, JSON:API Menu Items and Simple OAuth
- Answers recorded from a real Drupal 11.4 site
- Works in Vitest, Jest, Playwright, Cypress or msw, or as an HTTP server
https://github.com/Decipher/decoupled-drupal-mock
https://www.npmjs.com/package/decoupled-drupal-mock
I built it for Druxt, but it should suit any JSON:API client. It’s an alpha, so I’d love people to point their frontend at it and tell me where it doesn’t act like Drupal. Open an issue on GitHub, or reply here.
#decoupled #drupalGitHubGitHub - Decipher/decoupled-drupal-mock: Drupal's decoupled APIs without Drupal: JSON:API, Decoupled Router, menu linksets and Simple OAuth, from fixtures built from real releases. Built for Druxt.Drupal's decoupled APIs without Drupal: JSON:API, Decoupled Router, menu linksets and Simple OAuth, from fixtures built from real releases. Built for Druxt. - Decipher/decoupled-drupal-mock
commit 9bada59