Walk me through the "scaffold a Service Contract" recipe.

Goal: turn a Resource Model into a Magento-style service contract. Prompt: "Generate Api/<Entity>RepositoryInterface.php, Api/Data/<Entity>Interface.php, Api/Data/<Entity>SearchResultsInterface.php, plus the Model/<Entity>Repository.php implementation, all wired in etc/di.xml with preference for the interface. Use the existing ResourceModel/<Entity> and ResourceModel/<Entity>/Collection, do not change them." Files: 5. Verify: bin/magento setup:di:compile + vendor/bin/phpstan analyse Api Model + a quick REST GET /V1/<entity>/{id} call after adding a webapi.xml route. Time: 10 minutes start to first green test.

Kishan Savaliya
Kishan Savaliya
Adobe Certified Magento Commerce Developer
Ahmedabad [IN]working hours, replies within four hours
When do you need it

Read personally. Never shared. Or email the brief.

More on claude, recipes cookbook

Need it fixed, not just explained?

Send the brief with your store URL; the written quote comes back within 24 hours.