Examples
Every runnable example in this repo, mapped to the chapter it supports.
Every hands-on chapter in this site has a matching runnable example under
examples/
in the repo. Most examples ship both a Quarkus (Java) and a FastAPI
(Python) implementation against the same OpenAPI contract; a few chapters are
single-stack on purpose (Ch22 is a Quarkus REST deep-dive, Ch23 is its FastAPI
counterpart), and the two deployment-tier examples (Ch26, Appendix A) deploy
the same pair of services onto a cluster instead of adding a third stack.
| Example | What it shows | Stacks | Chapter |
|---|---|---|---|
| 00-prerequisites | Toolchain pin — Quarkus + FastAPI health checks over Docker Compose | Both | Ch0 |
| 04-contract-first | Contract-first anchor — shared OpenAPI/JSON Schema booking resource | Both | Ch4 |
| 05-http-methods-idempotency | HTTP methods & the idempotency matrix | Both | Ch5 |
| 06-content-negotiation | Content negotiation & status codes | Both | Ch6 |
| 07-partial-updates | Partial updates — JSON Merge Patch vs. JSON Patch | Both | Ch7 |
| 08-pagination | Filtering, projection & pagination | Both | Ch8 |
| 10-async-operations | Async / long-running operations | Both | Ch10 |
| 11-rerunnable-jobs | Rerunnable, server-driven scheduled jobs | Both | Ch11 |
| 12-hateoas | HATEOAS — state-dependent _links |
Both | Ch12 |
| 13-soft-delete-purge | Soft deletion vs. GDPR purge | Both | Ch13 |
| 14-versioning | API versioning strategies | Both | Ch14 |
| 15-range-requests | Large binary resources & Range requests | Both | Ch15 |
| 16-streaming | Three ways to stream a sequence of values incrementally | Both | Ch16 |
| 18-concurrency | Back-end I/O concurrency against a slow downstream dependency | Both | Ch18 |
| 19-http2-http3 | REST over HTTP/2 & HTTP/3 | Both | Ch19 |
| 20-openapi-depth | OpenAPI 3.1 in depth — JSON Schema-native components | Both | Ch20 |
| 21-multi-protocol-contracts | Multi-protocol contracts — REST + events, one schema | Both | Ch21 |
| 22-quarkus-rest-depth | Quarkus REST’s build-time, zero-reflection parameter model | Quarkus only | Ch22 |
| 23-fastapi-depth | FastAPI’s parameter model, the Quarkus deep-dive’s corollary | FastAPI only | Ch23 |
| 24-testing | The test pyramid for the booking create/read surface | Both | Ch24 |
| 25-local-with-docker-compose | Full local dev substrate, with an OTel trace end to end | Both | Ch25 |
| 26-minikube | The same two booking services on a minikube deployment tier | Both | Ch26 |
| 27-complete-project | One booking service assembling every prior chapter’s pattern | Both | Ch27 |
| 99-appendix-a-openshift-crc | The same two booking services on OpenShift Local (CRC) | Both | Appendix A |
Running an example
Each directory is self-contained — a README.md, a compose.yaml (or
k8s/ / helm/ for the two deployment-tier examples), and a verify.sh (or
run-minikube.sh / run-crc.sh) that proves it against the shared
contracts/openapi/shipping-api.yaml.
cd examples/04-contract-first
./verify.sh
See Prerequisites & the Lab for the full toolchain setup.