Building a Lightweight, Evidence-Driven HTTP API Compatibility Verification Tool
An Open-Source Java Project for Detecting Breaking API Changes, Validating Consumer Expectations, and Automating Contract Verification
Author: Soroush Neyestani
Version: v0.1.0
Release: November 2026
Status: Released
License: MIT
Technologies: Java, Java HTTP API, Jackson Core, JUnit, TSV, PowerShell, GitHub Actions
Category: Developer Tools / API Testing / Software Quality Engineering
Source Repository: Contract Testing Toolkit on GitHub
Official Release: v0.1.0
Executive Summary
Contract Testing Toolkit is an open-source Java project developed to demonstrate and verify a fundamental requirement of reliable API integration: a provider’s response must remain compatible with the expectations of its consumers.
In service-oriented software systems, an API may continue to execute successfully while introducing a change that breaks another application.
Removing a field, changing its data type, or modifying an expected HTTP status can invalidate a consumer’s assumptions without necessarily causing the provider’s own unit tests to fail.
The purpose of Contract Testing Toolkit is to make selected compatibility requirements explicit and independently verifiable.
The initial public release, v0.1.0, implements a focused HTTP response contract verification workflow. It obtains a real response from a local HTTP test provider, parses the returned JSON, and compares observable behavior with consumer requirements expressed through a version-controlled TSV contract.
The verifier checks expected HTTP status, required field presence, and data types for fields covered by the contract. It also supports optional fields and allows additional response fields that do not violate the documented consumer requirements.
The project includes deterministic compatibility scenarios, automated JUnit tests, CI verification on Linux and Windows, machine-readable test reports, and a publicly distributed source release.
The release passed 29 automated tests on both Ubuntu and Windows, with verification recorded for the main branch and official release tag.
The project is intentionally limited in scope. It is not an implementation of the complete Pact protocol, nor does it claim to support arbitrary HTTP interactions, nested JSON schemas, or production-scale contract governance.
Its engineering value lies in demonstrating a clearly defined compatibility model, executing that model against an actual HTTP response, and providing reproducible evidence that compatible and incompatible changes are treated differently.
1. The Problem: When a Working API Breaks Its Consumers
An important distinction in software engineering is the difference between a service functioning correctly in isolation and a service remaining compatible with other systems.
Consider an application that consumes an order API.
The consumer expects a successful HTTP response containing the information it needs to continue processing an order.
The provider’s implementation may be perfectly capable of serving requests. Its database connections may work, its internal business rules may execute, and its application tests may pass.
Nevertheless, compatibility can still be broken.
For example, a provider update might:
- Remove a previously required response field.
- Change the representation of an identifier.
- Return a different HTTP status than the consumer expects.
- Rename an attribute without updating dependent applications.
- Introduce a representation that the existing consumer cannot interpret.
These changes may be valid from the provider developer’s perspective while remaining incompatible with an existing consumer.
This creates a coordination problem.
In a tightly coupled release process, teams may attempt to solve the issue by manually testing both applications together before deployment.
However, this approach becomes increasingly difficult when services are independently developed, maintained, and released.
Contract verification addresses a narrower and more automatable question:
Does the provider still satisfy the expectations that a consumer has explicitly declared?
Contract Testing Toolkit explores this question through a small, reproducible Java implementation.
It does not attempt to determine whether the provider’s complete business behavior is correct.
Instead, it focuses on the compatibility characteristics supported by its documented response contract.
2. Project Objectives
The initial implementation was developed around several engineering objectives.
Make consumer expectations explicit
Instead of embedding all assumptions inside application-specific test code, the project represents selected response requirements in a separate contract definition.
This creates a reviewable artifact describing what the consumer requires from the provider.
Verify an actual HTTP response
A contract checker should not simply compare two static example files and report success.
For the supported scenario, the toolkit communicates with a running local test provider and evaluates the actual response returned over HTTP.
This establishes a relationship between the declared contract and observable provider behavior.
Detect meaningful breaking changes
The verifier must identify supported incompatibilities, including missing required fields, incorrect field types, and unexpected HTTP status values.
Avoid unnecessarily strict matching
Additional response fields should not automatically invalidate an existing consumer contract.
A consumer that requires a defined subset of the provider’s response should not fail merely because the provider supplies unrelated additional information.
Similarly, an explicitly optional attribute may be absent without violating the contract.
Produce reproducible evidence
Successful and unsuccessful compatibility cases should be covered by automated tests, not merely demonstrated manually.
The verification process should also run in CI across the supported environments.
Keep the first implementation maintainable
The initial scope prioritizes a small, understandable implementation with limited infrastructure dependencies.
A comprehensive contract-testing platform would require significantly broader functionality, which is deliberately outside the v0.1.0 release.
3. Conceptual Architecture
The toolkit is organized around the interaction between a consumer contract, an HTTP provider, and a verification process.
At a conceptual level, the flow is:
Consumer expectations → TSV contract → HTTP request → Provider response → JSON parsing → Compatibility evaluation → Test result
These stages serve different responsibilities.
Consumer Contract
The contract documents the aspects of the response on which the consumer depends.
It provides the expected requirements against which the provider’s response will be checked.
Local Test Provider
A synthetic HTTP provider supplies the response used during verification.
The provider operates through an IPv4 loopback interaction, keeping the demonstration local and independent of a production API.
HTTP Interaction
The toolkit performs the supported GET request and observes the resulting HTTP status and response content.
This is important because the verifier evaluates data obtained through an HTTP interaction rather than treating a static JSON document as the complete test target.
JSON Parsing
The response body is parsed using Jackson Core.
Parsing transforms the response into information that can be examined according to the supported contract rules.
Compatibility Evaluation
The verification logic compares the observed HTTP response with the documented consumer requirements.
It determines whether the specified status, field presence, and field-type expectations are satisfied.
Automated Test Execution
JUnit tests exercise the expected behavior of the implementation, including both compatible and deliberately incompatible response scenarios.
Continuous Integration
GitHub Actions executes the verification process on supported operating systems and records the test results.
This architecture deliberately separates the idea of declaring consumer expectations from the act of observing provider behavior.
The distinction is central to the project.
4. Contract Representation: Why TSV?
The first release uses tab-separated values (TSV) to represent its contract definitions.
TSV is not a universal API contract standard.
It is a deliberately simple representation for the initial supported verification model.
A text-based contract format offers several practical advantages:
Version control: Contract definitions can be committed and reviewed using ordinary Git workflows.
Human readability: The requirements are represented in a relatively straightforward tabular form.
Simple processing: A focused parser can handle the supported contract structure without introducing a full schema-definition platform.
Diff visibility: Changes to expected fields and their requirements can be inspected during code review.
Test fixtures: Multiple versions or variations of contract inputs can be maintained alongside automated tests.
These advantages also involve trade-offs.
A simple tabular representation is not ideal for arbitrary nested JSON objects, polymorphic response models, complex constraints, or multi-interaction API contracts.
It also requires a clearly documented interpretation of each supported field and rule.
Therefore, the v0.1.0 implementation should be understood as a tool with its own defined contract format.
It does not claim compatibility with native Pact contract files, OpenAPI definitions, or general JSON Schema documents.
This distinction prevents users from assuming interoperability that has not been implemented or verified.
5. Compatibility Semantics
One of the most important parts of the project is defining what counts as a compatible response.
A verifier is useful only when its matching rules are predictable.
Overly permissive validation can miss breaking changes.
Overly strict validation can reject harmless changes and make APIs unnecessarily difficult to evolve.
The initial release applies a defined set of response compatibility rules.
| Property | Verification behavior |
|---|---|
| HTTP status | Must satisfy the status expected by the contract |
| Required field | Must be present |
| Required field type | Must match the contract’s supported type expectation |
| Optional field | May be absent |
| Optional field when present | Its type is checked |
| Additional field | Allowed when not prohibited by another supported requirement |
| Missing required field | Incompatible |
| Incorrect expected field type | Incompatible |
This behavior is significant because the verifier does not treat complete JSON-object equality as the definition of compatibility.
Instead, it checks the requirements covered by the consumer contract.
Why additional fields are allowed
Suppose a consumer requires an identifier, a status, and an amount.
A future provider version may include additional information for other consumers.
If the original required fields and their supported type expectations remain valid, the addition alone does not have to break the original consumer.
Rejecting every additional field would create unnecessary coupling between the consumer and provider.
The toolkit therefore allows additive changes outside the documented requirements.
Why optional fields can be absent
An optional field represents information that the consumer must not require for the supported interaction to remain valid.
Its absence is therefore compatible with the contract.
However, optional does not mean unrestricted.
If an optional field is present, the verifier checks its declared type within the supported validation rules.
Why required field types matter
A field’s presence is not sufficient if its representation changes in a way that invalidates consumer expectations.
An identifier represented in an unexpected data type may become unusable for a consumer that relies on a different representation.
The toolkit therefore checks the data type of fields described by the contract.
This verification is intentionally limited to the supported top-level JSON field model. It is not a complete semantic validation of every possible JSON structure.
6. Four Verified Compatibility Scenarios
The project’s release evidence includes four important scenarios.
These scenarios demonstrate not only successful verification but also the expected behavior when a provider introduces an incompatible change.
Scenario 1 — Baseline Compatibility
The test provider returns a response that satisfies the documented consumer contract.
The expected HTTP status and required field conditions are met.
Expected outcome: Compatible.
This establishes a known valid reference case.
A baseline is essential because negative tests are meaningful only when the system can also recognize a valid response.
Scenario 2 — Breaking Contract Change
The project introduces controlled incompatibilities.
Two reported examples are particularly relevant:
Changing the type of id: The provider supplies an identifier using a type that does not match the contract expectation.
Removing price: The provider omits a field required by the consumer contract.
Both changes were detected by the verifier.
Expected outcome: Incompatible.
The important result is not simply that an exception occurs or that a test becomes red.
The verifier must identify the response as violating the relevant contract condition.
Scenario 3 — Compatible Additive Change
The provider supplies additional fields that the consumer contract does not require.
The existing documented expectations remain satisfied.
Expected outcome: Compatible.
This case proves that the verifier is not enforcing unnecessarily strict equality between the entire response and an earlier example.
Scenario 4 — Recovery
After introducing an incompatible response, the provider returns to behavior that satisfies the original contract.
The response is checked again.
Expected outcome: Compatible.
This scenario demonstrates that verification responds to the actual observed behavior rather than retaining a previous failure as an irreversible state.
Why all four scenarios matter
A contract-testing demonstration containing only a successful baseline proves very little.
A useful verifier must distinguish valid behavior from invalid behavior.
It must also distinguish a genuine incompatibility from a harmless extension.
The four scenarios exercise these distinctions:
Compatible → Incompatible → Compatible extension → Restored compatibility
They provide a compact but meaningful demonstration of the toolkit’s compatibility model.
7. Technology Selection
The implementation uses Java with a small set of supporting technologies.
Java
Java provides the implementation language for the verification logic and supporting test application.
The project demonstrates using Java not only for business applications but also for developer tooling and quality-assurance infrastructure.
Java HTTP API
The supported HTTP interaction uses Java’s HTTP capabilities.
This allows the test workflow to issue a real request and inspect the response returned by the local provider.
Jackson Core
Jackson Core is used for JSON parsing.
Its role is to process the HTTP response data so the verifier can evaluate the properties covered by the contract.
The project does not depend on a claim that Jackson automatically provides contract compatibility semantics.
Those semantics belong to the toolkit’s own verification logic.
JUnit
JUnit provides the automated testing framework.
The tests cover the supported behavior and verify that intended incompatibilities are detected.
TSV
TSV provides the initial contract representation.
Its simplicity supports a manageable first release while intentionally limiting expressiveness.
PowerShell
The project includes PowerShell-based verification tooling, supporting reproducible execution of the documented checks in its supported workflow.
GitHub Actions
GitHub Actions provides automated verification for repository changes and release revisions.
The public release records successful execution on Ubuntu and Windows.
Together, these technologies form a deliberately modest toolchain.
The project does not introduce a database, message broker, Kubernetes deployment, or hosted contract broker for a scope that does not require them.
8. Automated Testing and Quality Evidence
The initial public release includes 29 automated tests.
According to the recorded publication report, all 29 tests passed in the validated environments.
| Verification environment | Result |
|---|---|
| Local Windows execution | 29 tests passed |
| Extracted release-candidate source | 29 tests passed |
| Ubuntu 24.04 CI | 29 tests passed |
| Windows Server 2025 CI | 29 tests passed |
| Public main-branch CI | Successful |
| Public release-tag CI | Successful |
The project was also tested through both push and pull-request events during development.
Positive tests
Positive tests verify that correctly formed contracts and compatible provider responses are accepted.
They establish the intended successful behavior.
Negative tests
Negative tests verify that the toolkit recognizes invalid conditions.
In this project, the distinction between an expected negative result and a broken test suite is especially important.
For example, when a test deliberately supplies a response with a missing required field, the verifier should report the contract violation.
The automated test should pass if that expected detection occurs correctly.
A green CI result can therefore include scenarios where the verifier intentionally rejects an incompatible provider response.
Regression coverage
The test suite protects the documented behavior against future changes to the implementation.
A change that accidentally begins accepting incompatible responses, or rejecting valid additive responses, can be detected by the corresponding regression tests.
Test isolation
The reported demonstration uses a synthetic local provider rather than relying on an external production service.
This supports predictable testing conditions and reduces external environmental dependencies.
It also establishes a clearer security boundary for the example workflow.
Cross-platform evidence
Running the tests on both Windows and Ubuntu is particularly useful for developer tooling.
It helps expose differences in process execution, environment configuration, filesystem behavior, and scripting assumptions.
Passing on two operating-system environments does not establish universal portability, but it provides stronger evidence than testing exclusively on the developer’s workstation.
9. Continuous Integration and Test Artifacts
The public repository includes a GitHub Actions verification workflow.
CI checks were recorded for the main branch and the released version.
Main-branch verification:
https://github.com/soroushneyestani/http-contract-testing-toolkit/actions/runs/45033961293
Release-tag verification:
https://github.com/soroushneyestani/http-contract-testing-toolkit/actions/runs/45034408230
The distinction matters.
A successful development-branch run does not automatically establish that the exact released source has been verified.
Running the workflow against the release tag connects the published revision with its test evidence.
Downloadable verification results
The release preparation included downloadable test-report artifacts.
Four report packages were inspected in the reported verification process.
Their SHA-256 integrity, XML test-report contents, and demonstration outputs were checked.
This provides evidence beyond a green badge.
A status indicator communicates the result of a workflow, but test reports allow a reviewer to inspect what was executed and what was reported.
CI as a regression gate
Automated contract verification is particularly useful as a quality gate.
When a provider change modifies a supported response property in a way that violates consumer expectations, verification should detect the incompatibility before the change is accepted.
Conversely, compatible additions should not unnecessarily block development.
The toolkit demonstrates both sides of that distinction within its defined scope.
It does not claim to provide deployment authorization, production monitoring, or compatibility guarantees for API behaviors outside the verified contract.
10. Engineering Trade-offs
The value of an engineering project is not measured only by which features it implements.
The decisions about what not to implement are equally important.
Several trade-offs characterize this initial release.
Focused compatibility rules instead of full schema validation
A full-featured schema engine would introduce substantially more complexity.
The toolkit instead supports HTTP status and top-level JSON field expectations.
This makes the first version easier to reason about, but limits the structures it can verify.
TSV instead of a standardized contract ecosystem
A simple TSV contract is easy to inspect and version.
However, it does not provide native compatibility with widely adopted contract-definition formats.
This choice favors a focused demonstrator over immediate interoperability.
Local HTTP verification instead of external infrastructure
An isolated loopback provider enables tests that exercise a real HTTP interaction without requiring a deployed service or hosted broker.
This improves repeatability but does not demonstrate distributed-network behavior.
Consumer-required subset matching instead of complete response equality
Accepting additional fields reduces false incompatibility reports.
The trade-off is that fields outside the contract are not evaluated merely because they appear in the response.
This is appropriate for the supported consumer-expectation model.
Limited protocol coverage instead of an all-purpose API testing framework
The initial release targets one GET interaction.
It does not attempt to cover authentication sequences, multiple provider states, POST or PATCH semantics, asynchronous messages, or complex multi-service workflows.
These boundaries reduce the risk of presenting incomplete functionality as general-purpose infrastructure.
11. Relationship to Pact
The design draws inspiration from the principles of consumer-driven contract testing, particularly the separation between consumer expectations and provider verification.
Pact provides an established ecosystem for contract testing and supports richer interaction definitions and verification workflows.
Its documentation describes consumer tests and provider verification as complementary stages.
Reference:
https://docs.pact.io/getting_started/how_pact_works
Contract Testing Toolkit is a separate, original project with a much smaller scope.
It is not an official Pact product.
It does not implement native Pact contract-file compatibility.
It does not provide the complete Pact consumer-testing workflow, provider-state management, message-contract capabilities, or broker-based compatibility governance.
These differences are important.
The project should be evaluated as an independently implemented, focused HTTP response compatibility verifier, not as a replacement for an established contract-testing framework.
Its purpose is to demonstrate concrete engineering behavior through transparent implementation, reproducible tests, and documented limitations.
12. Security and Operational Boundaries
The release uses a synthetic HTTP provider operating on IPv4 loopback for its demonstrated interaction.
This keeps the example independent of public production endpoints and real customer systems.
The toolkit’s source and test data were prepared for public distribution.
The original development repository remains private, while the release-eligible source was published through a separate public repository.
This separation avoids unintentionally publishing unrelated internal project history.
The public release also includes third-party licensing information and a declared MIT license for the original project.
What the release does not claim
The project is not a security scanner.
Passing its tests does not prove that a provider is free from vulnerabilities.
The verifier does not establish authorization correctness, confidentiality, safe deserialization across arbitrary inputs, or complete HTTP protocol compliance.
Similarly, running the demonstration locally does not amount to a security assessment of a production API.
These responsibilities require their own testing methods and security controls.
13. Public Release and Source Integrity
Version v0.1.0 was published from a dedicated public distribution repository.
Public repository:
https://github.com/soroushneyestani/http-contract-testing-toolkit
Official release:
https://github.com/soroushneyestani/http-contract-testing-toolkit/releases/tag/v0.1.0
Exact release revision
The published tag points to the following Git commit:
112333c3072eb1590cac85e511f58201346d9bf8
This provides a precise source revision for the initial public release.
The released implementation can therefore be distinguished from subsequent development changes.
Release archive
The release includes a downloadable source ZIP:
The published SHA-256 digest is:
c74ec7104ba37fbad93fc24169f797f7507a2f8c03889b5b7e481079832cacd5
The source archive was reportedly downloaded without authentication and checked against the published checksum.
The corresponding checksum file is available at:
A SHA-256 comparison allows the downloaded file to be checked for byte-level consistency with the published digest.
It does not independently establish that the source has no vulnerabilities or that the implementation is correct in every possible scenario.
Licensing
The original toolkit is published under the MIT License.
Third-party components retain their respective licensing obligations, documented in the release notices.
The release uses Jackson Core for JSON handling and JUnit for automated testing.
A project-level MIT license does not replace or override the licenses of those dependencies.
14. How to Evaluate the Project
A developer evaluating the toolkit should focus on its observable behavior rather than treating documentation alone as proof of correctness.
The published repository and its release artifacts provide the basis for such an evaluation.
A practical review can follow this sequence:
First, inspect the contract model. Understand which response properties are covered and which are intentionally excluded.
Second, examine the local provider. Confirm that the verifier interacts with an actual HTTP endpoint in the supported example.
Third, inspect the baseline verification. Establish what the toolkit considers compatible behavior.
Fourth, examine the breaking-change scenarios. Review how a type mismatch and missing required field are detected.
Fifth, examine the additive-change scenario. Verify that additional fields do not unnecessarily invalidate the existing consumer contract.
Sixth, inspect the automated tests and CI results. Confirm that the supported cases are checked by executable assertions.
Finally, compare the source archive with its published checksum. This connects the inspected distribution to the reported release.
The repository’s own README and technical documentation remain authoritative for the exact execution commands and contract-file syntax.
15. Known Limitations of v0.1.0
The first release has a deliberately narrow operational scope.
| Area | Supported scope or limitation |
|---|---|
| HTTP method | GET |
| Network interaction | IPv4 loopback test provider |
| Response representation | JSON |
| Field depth | Top-level fields |
| Contract format | TSV |
| Status verification | Supported |
| Required field verification | Supported |
| Present-field type verification | Supported |
| Optional field omission | Supported |
| Additional fields | Allowed |
| Nested objects and arrays | No general nested-schema support claimed |
| Native Pact compatibility | Not supported |
| Complete consumer-driven workflow | Not claimed |
| Production contract broker | Not included |
| Validated operating systems | Ubuntu and Windows |
These limitations should be considered part of the release contract.
A project can be complete within a carefully defined scope without providing every feature associated with its broader technical category.
Version v0.1.0 represents the completed initial implementation.
It should not be confused with v1.0.0 or an unconditional promise of a stable, general-purpose public API.
16. Possible Future Directions
The current version provides a foundation that could support broader functionality in later releases.
Possible extensions include:
- Additional HTTP methods such as POST, PUT, PATCH, and DELETE.
- Contract verification for nested JSON objects and arrays.
- More expressive optionality and value-matching rules.
- Multiple interactions and provider-state scenarios.
- Integration with standardized contract representations.
- More detailed compatibility diagnostics.
- Expanded consumer verification examples.
- Broader cross-platform support and automated compatibility reporting.
These are potential enhancements, not features claimed by v0.1.0.
Their implementation would require additional design, compatibility review, testing, and versioning decisions.
17. Engineering Lessons
Several broader software-engineering lessons emerge from this project.
Compatibility is not the same as correctness
A service may satisfy its own internal requirements while violating a consumer’s assumptions.
Both aspects require appropriate verification.
Tests should validate failure detection
A test suite that confirms only successful behavior provides incomplete assurance.
Deliberately incompatible fixtures are essential for demonstrating that the verifier rejects the conditions it is intended to detect.
Flexible compatibility rules reduce coupling
Allowing additive response fields supports provider evolution when consumer expectations remain satisfied.
Strict equality is not always the correct compatibility policy.
Reproducibility requires more than a successful local run
Tests executed on multiple operating systems, CI evidence, downloadable reports, and exact release revisions provide a stronger verification trail.
Technical limitations should be explicit
A small and well-defined implementation is more credible than a broad product description unsupported by actual capabilities.
The project demonstrates contract verification within its stated boundaries rather than claiming universal API compatibility analysis.
Release engineering is part of software quality
A complete engineering deliverable includes more than source code.
Documentation, licensing, source integrity, CI evidence, and controlled release history contribute to the reliability and inspectability of the work.
Conclusion
Contract Testing Toolkit v0.1.0 demonstrates a focused approach to detecting breaking HTTP response changes through explicit consumer expectations and automated verification.
The implementation combines Java HTTP interaction, Jackson-based JSON parsing, TSV contracts, JUnit regression tests, and GitHub Actions verification.
Its compatibility model distinguishes missing required fields and type mismatches from acceptable optional-field omission and additive response changes.
The release includes 29 passing automated tests on Ubuntu and Windows, documented verification scenarios, downloadable source artifacts, and source-integrity checks.
The project does not attempt to replace Pact or establish comprehensive API compatibility across every protocol and data structure.
Instead, it demonstrates an engineering principle that applies to systems of any size:
An API change should not be considered safe merely because the provider still works. It should be evaluated against the expectations of the systems that depend on it.
Reliable integration begins by making those expectations explicit, testing them against observable behavior, and preserving the evidence.
Project Resources
Source Code
https://github.com/soroushneyestani/http-contract-testing-toolkit
Official v0.1.0 Release
https://github.com/soroushneyestani/http-contract-testing-toolkit/releases/tag/v0.1.0
Release Source ZIP
https://github.com/soroushneyestani/http-contract-testing-toolkit/releases/download/v0.1.0/contract-testing-toolkit-v0.1.0-source.zip
SHA-256 Checksums
https://github.com/soroushneyestani/http-contract-testing-toolkit/releases/download/v0.1.0/SHA256SUMS.txt
Main Branch CI Verification
https://github.com/soroushneyestani/http-contract-testing-toolkit/actions/runs/45033961293
Release Tag CI Verification
https://github.com/soroushneyestani/http-contract-testing-toolkit/actions/runs/45034408230
Pact Reference Documentation
https://docs.pact.io/getting_started/how_pact_works
Developed by Soroush Neyestani
Version: v0.1.0
License: MIT
Project Type: Open-Source Developer Tool
Keywords: Contract Testing, API Compatibility, HTTP Verification, Consumer Expectations, Java, Jackson Core, JUnit, Regression Testing, GitHub Actions, Continuous Integration, Software Quality, Open Source