gingermusketeer / publish-open-api-spec-to-postman

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publish Open Api Spec to Postman collection

In order to use this library you first need to generate a Postman API token and add it as a secret to your repo

Afterwards you need to find the ID of the collection that you want to sync to. You can get this info executing the folowing curl:

curl --location \
  --request GET \
  'https://api.getpostman.com/collections' \
  --header 'X-API-Key: apiKey'

Configuring

It is pretty straightforward:

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: diegosanteri/publish-open-api-spec-to-postman@v1
        with:
          postmanApiKey: ${{ secrets.POSTMAN_API_KEY }}
          postmanCollectionid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
          swaggerPath: (swagger.json) or (url address)

Done!

About


Languages

Language:JavaScript 100.0%