-
Use the generator to create the stubs Using the https://openapi-generator.tech/docs/generators/aspnetcore
docker run --rm \ -v ${PWD}/../:/local openapitools/openapi-generator-cli generate \ -i /local/InterfaceDescription/openapi_bundled.yaml \ -g aspnetcore \ --additional-properties=aspnetCoreVersion=6.0,packageName=Demo.Provider.Service,packageTitle="Demo Provider Services", \ -o /local/Provider/out/aspnetcore
-
Copy the generated stubs into
application
and change the directory -
start & build the application via
./build.sh
-
Launch project via
dotnet run --project src/Demo.Provider.Service/Demo.Provider.Service.csproj --launch-profile OpenAPI
-
Implement API endpoints at
src/Demo.Provider.Service/Controllers/PersonApi.cs
with the help of the In-Memory-Database
- add verification tests
- configure to connect them with the broker on
PACT_BROKER_BASE_URL
andPACT_BROKER_TOKEN
- check if deployment is possible via
docker run \
-v $(pwd)/Consumer/pacts:/pacts \
pactfoundation/pact-cli:latest -- \
pact-broker can-i-deploy \
--pacticipant Demo.Provider \
--latest \
--broker-base-url $PACT_BROKER_BASE_URL \
--broker-token $PACT_BROKER_TOKEN