Postman のプロフィール画面 → 「EditProfile」 → 「API Keys」 「Generate API Key」で APIKey を作成。
コレクションの三点マーク「•••」→「Share(共有)」→ 「Via API(API 経由)」のタブを開く
https://api.postman.com/collections/{{collection_id}}?access_key=
の{{collection_id}}の部分がコレクション ID となる
.env
POSTMAN_API_KEY=
POSTMAN_COLLECTION_ID=
OPENAPI_FILE_PATH=
PATHPARAMETERS=
| 環境変数名 | 説明 | 例 |
|---|---|---|
| OPENAPI_FILE_PATH | マウント先の OpenAPI のファイル Path (/忘れずに) | ./internal/docs/openapi.json:/openapi.jsonとした場合OPENAPI_FILE_PATH=/openapi.json |
| PATHPARAMETERS | Postman の変数に置き換えたい PathParameter を定義する(半角スペース区切り) | PATHPARAMETERS=facility_id position_id department_id team_id position_id |
services:
...(他のコンテナ定義)
postman_collection_update:
image: fukuemon/postman_collection_update
volumes:
- ./openapi.json:/openapi.json
env_file:
- .env
profiles:
- manual
docker-compose run --rm postman_collection_update
or
docker compose run --rm postman_collection_update
docker pull fukuemon/postman_collection_update
docker run --env-file .env -v $(pwd)/{{OpenAPIのファイルpath}}:/{{OpenAPIのファイルpath}} --rm postman_collection_update
例:
docker run --env-file .env -v $(pwd)/openapi.json:/openapi.json --rm fukuemon/postman_collection_update
Content type
Image
Digest
sha256:6a2d27d1b…
Size
54 MB
Last updated
almost 2 years ago
docker pull fukuemon/postman_collection_update