Every API team has the same file: a Postman collection that was correct six months ago. Someone adds an endpoint, nobody updates the collection, and the next person onboarding spends an afternoon guessing URLs and bodies.
OpenAPI solves this, but for many internal Yii2 APIs a full spec is more than the team needs. What people actually use is a collection to click through.
This post shows a smaller approach: describe each endpoint with a few annotations right next to the action, and generate the collection with one command.
Install
composer require --dev iguazoft/yii2-postman-generator
Enter fullscreen mode
Exit fullscreen mode
The extension registers a postman console command through Yii2's extension bootstrap.…