openapi/ holds a design example without a provider implementation. contracts/baselines/ keeps separate accepted snapshots for runnable providers.
One reviewed contract. Consistent API checks.
oas-polycontract shows how a reviewed specification can guide provider verification, consumer development against a provider Smart Mock, and live API integration tests.
Separate contracts by API boundary.
The repository keeps the design scaffold, runnable services, downstream dependency, and event examples distinct. Each contract has a clear scope and corresponding checks.
demo/ contains one Product lookup, an in-memory Order lifecycle scoped to each app instance, and a WireMock-backed Inventory dependency.
clients/features/ supplies Product and Order scenarios. API-specific Cucumber steps live in clients/js/bdd/. clients/shared/generate-acceptance-cases.mjs exports scenario data to clients/shared/acceptance-cases.json for all seven native API suites; Node.js service tests check behavior in isolation.
contracts/events/ holds linted AsyncAPI examples. evals/ checks docs, test entry points, collection paths, pipeline wiring, mock cases, and roadmap progress.
legacy/ holds OAS-aligned Postman and Bruno examples for Product lookup and the stateful Order flow. Their paths are checked against the contracts.
One command runs the demonstration.
Locally, bash ./run.sh runs the complete sequence. Contract CI runs shared core gates once, then starts a separate matrix job for each language stack and Playwright. Each matrix job uses the native profile and its own Testcontainers network for Product, Order, and WireMock. OAS, fixtures, and client sources are read-only mounts; the runner checks service health and cleans up containers and networks.
Spectral checks OpenAPI and AsyncAPI; oasdiff checks the root contract against its baseline.
A shared builder applies network, logging, mounts, and runtime options in each job. Services use health checks; one-shot tasks use completion checks. Every language job has its own network.
Language suites call the Product API at app:8080 and Order API at stateful-app:8082. See the framework box in the test-role map.
POLYCONTRACT_NATIVE_CLIENTS=rust,python. CI runs Rust, Go, Python, JavaScript, TypeScript, Java, C#, and Playwright as separate jobs after shared gates pass.Separate workflow triggers. Clear scan ownership.
Contract CI runs shared specification and provider gates once, then starts an isolated native API job for each language stack and Playwright. Security and showcase checks keep separate triggers. A manual performance workflow compares cold and warm runs on Ubuntu 24.04 and 26.04.
contract.yml
Main push · pull request · manual run
core profileEvaluations, service tests, Spectral, oasdiff, canaries, provider checks, fuzzing, Cucumber, and consumer mock checks run once
Trivy scans the exported Node test runtime archive, WireMock and Specmatic images, and verified JAR
Seven language stacks and Playwright run in separate jobs after the core gates pass
Each job starts Product, Order, and WireMock on its own Testcontainers network
Compare stage duration by language and test framework
security.yml
Main push · pull request · weekly · manual
Source code and workflow analysis
Repository source is scanned on workflow triggers; temporary positive controls run only on manual dispatch
Repository secret scanning
Dependency and configuration findings
Dependency Review runs only for pull requests.
showcase.yml
Main push to showcase files · manual run
Copy project-flow.html to index.html
Publish the static site artifact
Serve the interactive project map
The repository must have Pages configured to use GitHub Actions.
performance.yml
Manual benchmark · Ubuntu 24.04 and 26.04
Run the same pipeline on Ubuntu 24.04 and 26.04
One cold build followed by four warm-cache runs
Publish per-runner cold time, warm median, and range
Contract tests and API integration tests have distinct targets.
Specmatic provider and mock checks use the Product OAS with different targets. Feature files provide shared acceptance cases for Cucumber and each native language suite. Native suites exercise live APIs and validate responses against OAS.
Provider contract verification
app:8080Consumer development with a provider Smart Mock
specmatic-mock:9000Product API integration
app:8080Native API suite frameworks
cargo test · reqwest · jsonschema
go test · net/http · kin-openapi
pytest · Requests · openapi-core
node:test · Fetch · @oaverify/core
Vitest · Fetch · @oaverify/core
JUnit · REST Assured · OpenAPI validator
xUnit · HttpClient · project-scoped NJsonSchema adapter
Playwright Test · APIRequestContext
Shared API acceptance cases
clients/features/clients/shared/generate-acceptance-cases.mjs writes clients/shared/acceptance-cases.jsonclients/js/bdd/Stateful Order tests
stateful-app:8082Downstream integration
Manual API debugging
localhost:8080 and Order API · localhost:8083Test independent requests and linked workflows.
Schemathesis generates independent Product API requests from OAS, probes boundaries, and validates responses. Each case does not rely on data from earlier cases.
The separate Order API preserves state across a lifecycle. OAS links pass the created identifier between operations.
Rust, Go, Python, JavaScript, TypeScript, Java, and C# repeat the lifecycle and validate each response against the stateful OAS.
Validate live responses in native test suites.
Each example uses a small API client object for requests and a language-native test framework for behavior and OAS response validation.
reqwest, net/http, and requests validate response status, media type, and schema.
@oaverify/core validates live provider responses and Smart Mock examples.
REST Assured and HttpClient cover live Product API and stateful Order API integration. Playwright covers the live Product API.
Compare stage timings before setting thresholds.
The five-sample baseline measured 304s cold and a 201s warm median (200–205s range). It predates Testcontainers, so rerun the Ubuntu matrix before comparing current performance.
Contract run 44635628482; see the CSV artifact for stage timings.
Cases generated and fuzzing duration.
Warm range 200–205s; build 91s cold and 2s warm.
Verified Testcontainers contract run · Pre-migration performance baseline · Contract timing artifacts · Run the benchmark again · Fuzz diagnostic · Roadmap