Update maestro.rest.swagger-v1.0.0.json #1
This file contains hidden or 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: Postman API Integration for Maestro | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'maestro.rest.swagger-v1.0.0.json' | |
jobs: | |
upload-swagger: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Send Swagger Spec to Postman API Maestro | |
env: | |
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} | |
run: | | |
SWAGGER_FILE="./maestro.rest.swagger-v1.0.0.json" | |
API_ID=${{vars.MAESTRO_API_ID}} | |
SCHEMA_ID=${{vars.MAESTRO_DEFINITION_ID}} | |
FILE_PATH="index.json" | |
CONTENT=$(jq -Rs . < ${SWAGGER_FILE}) | |
curl --location --request PUT "https://api.getpostman.com/apis/$API_ID/schemas/$SCHEMA_ID/files/$FILE_PATH" \ | |
--header "Accept: application/vnd.api.v10+json" \ | |
--header "Content-Type: application/json" \ | |
--header "X-Api-Key: $POSTMAN_API_KEY" \ | |
--data "{\"content\": ${CONTENT}}" |