Skip to content

docs(examples): add service consumer/provider HTTP example#1528

Merged
JP-Ellis merged 6 commits intopact-foundation:mainfrom
adityagiri3600:docs/service-consumer-provider-example-1274
Apr 14, 2026
Merged

docs(examples): add service consumer/provider HTTP example#1528
JP-Ellis merged 6 commits intopact-foundation:mainfrom
adityagiri3600:docs/service-consumer-provider-example-1274

Conversation

@adityagiri3600
Copy link
Copy Markdown
Contributor

✈️ Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

📝 Summary

Adds a new HTTP example for a service that is both consumer and provider.

  • adds examples/http/service_consumer_provider/
  • updates examples/http/README.md and examples/README.md

🔥 Motivation

Closes #1274.

🔨 Test Plan

uv run ruff check examples/http/service_consumer_provider
cd examples/http/service_consumer_provider && uv run --group test pytest
cd /root/oss/pact-python && uv run mkdocs build --strict

🔗 Related issues/PRs

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74%. Comparing base (9668714) to head (57e3492).
⚠️ Report is 19 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1528   +/-   ##
====================================
  Coverage    74%     74%           
====================================
  Files        33      33           
  Lines      3975    3975           
====================================
  Hits       2964    2964           
  Misses     1011    1011           
Flag Coverage Δ
examples 37% <ø> (+<1%) ⬆️
tests 73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JP-Ellis
Copy link
Copy Markdown
Contributor

JP-Ellis commented Apr 8, 2026

Thanks for the PR! I'm on holidays at the moment, but I will take a look at this next week :D

Signed-off-by: JP-Ellis <josh@jpellis.me>
As these examples are intended to be self-contained reference snippets
for others, I have greatly expanded on the documentation contained
within.

Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis
Copy link
Copy Markdown
Contributor

Overall looks really good 🚀

I have just added some extra documentation (similar to some of other examples), just trying to re-inforce certain ideas and being very clear as to what is going on. Please let me know what you think, and if all good, I'll merge the PR.

@adityagiri3600
Copy link
Copy Markdown
Contributor Author

thanks! it looks much better

@JP-Ellis JP-Ellis merged commit 57c60b5 into pact-foundation:main Apr 14, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a complete example with a consumer/provider service

2 participants