Skip to content

chore(examples): add protobuf example #1089

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

Merged
merged 2 commits into from
Jun 26, 2025
Merged

chore(examples): add protobuf example #1089

merged 2 commits into from
Jun 26, 2025

Conversation

JP-Ellis
Copy link
Contributor

📝 Summary

Add a new example showcasing how to use the Protobuf plugin to validate Protobuf over HTTP content.

This first example is crude and does not yet do any content matching. This will be done in a follow up PR.

🚨 Breaking Changes

🔥 Motivation

Plugins are not very easy to use, and the v3 API is still very new. This should hopefully help with adoption of V3 and help end-users of Pact Python adopt the tool.

🔨 Test Plan

All examples are tested as part of CI.

🔗 Related issues/PRs

JP-Ellis added 2 commits June 25, 2025 14:26
Add a new example showcasing how to use the Protobuf plugin to validate
Protobuf over HTTP content.

Signed-off-by: JP-Ellis <[email protected]>
@JP-Ellis JP-Ellis self-assigned this Jun 25, 2025
@JP-Ellis JP-Ellis added area:examples Relating to the examples area:v3 Relating to the pact.v3 module labels Jun 25, 2025
Copy link

codecov bot commented Jun 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78%. Comparing base (3337262) to head (89a6006).
Report is 4 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1089   +/-   ##
====================================
  Coverage    78%     78%           
====================================
  Files        31      31           
  Lines      3683    3683           
====================================
+ Hits       2890    2896    +6     
+ Misses      793     787    -6     
Flag Coverage Δ
examples 58% <ø> (+<1%) ⬆️
tests 77% <ø> (ø)

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 JP-Ellis requested review from mefellows and YOU54F June 25, 2025 04:52
Copy link
Member

@mefellows mefellows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That example was very clear to me, nicely done. The comments are likely to be very helpful for a newbie.

The DSL looks sensible also, and presumably Python idiomatic.

Copy link
Member

@YOU54F YOU54F left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, comment about adding parameterised provider states, but other than that 👌🏾 from me. code docs are useful for context

@JP-Ellis JP-Ellis merged commit af1a89c into main Jun 26, 2025
40 checks passed
@JP-Ellis JP-Ellis deleted the chore/protobuf-example branch June 26, 2025 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:examples Relating to the examples area:v3 Relating to the pact.v3 module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants