Menu

Stop maintaining Postman collections by hand in Yii2
📰

Stop maintaining Postman collections by hand in Yii2

DEV Community: php·Danny Rios Tolosa·20 days ago
#J4CObrz5
#devto#dev#postman#collection#users
Long article (435 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.