Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Support retrieving OAS provider contracts from PactFlow #45

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Aug 22, 2023

  1. feat: support auth mechanisms via env var

    If the pact broker has auth enabled, set the necessary env vars to access the pact broker resources.
    
    PACT_BROKER_USERNAME
    PACT_BROKER_PASSWORD
    PACT_BROKER_TOKEN
    YOU54F committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    0da4ccc View commit details
    Browse the repository at this point in the history
  2. fix!: remove --user option which doesnt work from cli

    replace with PACT_BROKER_USERNAME/PACT_BROKER_PASSWORD env vars
    if using OS Pact Broker.
    
    Use PACT_BROKER_TOKEN if using Pact Broker with Bearer auth
    (such as PactFlow)
    YOU54F committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    f583ac7 View commit details
    Browse the repository at this point in the history
  3. feat: support reading OAS from PactFlow

    notes:- leverages PactFlow internal url for BDCT
    
    internal/contracts/bi-directional
    
    curl -H "Authorization: Bearer $PACT_BROKER_TOKEN" https://testdemo.pactflow.io/internal/contracts/bi-directional/provider/pact-provider-poc/version/64898db/consumer/pact-consumer-poc/version/9191e17/provider-contract | jq .
    
    relies on the following resource
    
    _embedded[providerContract][content]
    YOU54F committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    b26e632 View commit details
    Browse the repository at this point in the history
  4. chore: update tests

    YOU54F committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    ccf6272 View commit details
    Browse the repository at this point in the history