Skip to content

About

A small demo showing the integration of OpenAPI and PACT

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Demo for integrating OpenAPI with Pact

This application demos the workflow of a simple OpenAPI specification in combination with Pact.

  • Defining and specifying the OpenAPI Description
  • Generating Consumer Stubs from the specification and defining the first pacts in Consumer
  • Generating Server Stubs, implementing the API and verifying the pacts in Provider
flowchart TD
    OpenAPI{{OpenAPI Specification}} --> |uses C# Client Generator| Consumer(.NET Consumer Application)
    Consumer --> |defines Unit Tests to generate| PF{{Pacts}}
    PF-. stored in File or PactFlow .-> Broker[(Broker)]

    OpenAPI --> |uses C# Server Generator for| Provider(.NET Provider Application)
    Verification --> |runs| Provider
    
    Verification-. uses Pacts from .-> Broker
Loading

Besides storing and exchanging pacts via files an integration via http://pactflow.io is shown.

To integrate with PactFlow register an account and obtain a read/write Token and Host Configuration (e.g. from https://trustbit.pactflow.io/settings/api-tokens)

export PACT_BROKER_BASE_URL="https://trustbit.pactflow.io"
export PACT_BROKER_TOKEN=yourToken

About

A small demo showing the integration of OpenAPI and PACT

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages