Skip to content

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

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!