Merge pull request #352 from maykinmedia/feature/json-merge-patch #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: generate-postman-collection | |
on: | |
push: | |
paths: | |
- "src/objects/api/v*/openapi.yaml" | |
- ".github/workflows/generate-postman-collection.yml" | |
branches: | |
- '**' | |
workflow_dispatch: | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ['v1', 'v2'] | |
name: Run with version v${{ matrix.version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12' | |
- name: Install dependencies | |
run: npm install -g openapi-to-postmanv2 | |
- name: Create tests folder | |
run: mkdir -p ./tests/postman | |
- name: Generate Postman collection | |
run: openapi2postmanv2 -s ./src/objects/api/${{ matrix.version }}/openapi.yaml -o ./tests/postman/collection.json --pretty |