|
Cyrano is at |
Cyrano implements MicroProfile Rest Client 4.0 strictly. Migration means aligning annotations with the spec and giving up the proprietary extensions of existing implementations.
From SmallRye Rest Client
SmallRye is the implementation used by Quarkus and WildFly. Its spec fidelity is high; porting is conceptually direct.
| SmallRye | Cyrano | Note |
|---|---|---|
|
|
Identical (MP spec). |
|
|
Identical. |
|
|
Identical. Resolved via |
|
|
No Vert.x configuration. Vert.x connection-pool settings have no equivalent — the pool is internal to |
|
No equivalent in Cyrano |
Use Heisenberg (MP Fault Tolerance) alongside. |
OpenTelemetry propagation via SmallRye OTel |
Via Humboldt server-side + W3C propagator |
To be documented. |
Quarkus-style |
|
Namespace switch. Official MP Config keys are preserved. |
|
Same |
Identical. |
Dev mode (hot reload) |
Standard Maven cycle |
No dev-mode equivalent for now. |
From RESTEasy MicroProfile Rest Client
RESTEasy exposes the same MP Rest Client API plus a proprietary extension layer.
| RESTEasy | Cyrano | Note |
|---|---|---|
|
|
Identical. |
|
|
Zero external dependency. No Apache HC config to port — JDK |
|
Not supported |
Multipart is not covered by MP Rest Client 4.0. |
|
Standard |
The JAX-RS Client fluent API is not the MP Rest Client operating mode (typed interface only). |
|
Same |
Identical. |
|
|
The Cyrano client is an interface proxy, not a |
|
|
Standard JAX-RS — identical declarations. |
Logging via |
|
No global listener API — Cyrano follows the spec strictly. |
From Jakarta REST Client (no MicroProfile)
The jakarta.ws.rs.client.Client + WebTarget mode is fluent and imperative; Cyrano is declarative via interface. Porting requires more effort.
| Jakarta REST Client | Cyrano | Note |
|---|---|---|
|
|
Required refactor — extract each HTTP call into an annotated interface method. |
Instance per call |
One proxy per client, shared |
Bonus: no connection leak, shared |
|
Method returning |
Same semantics, more natural signature. |
Imperative configuration |
Annotations + MP Config |
More declarative, more testable. |
To preserve jakarta.ws.rs.client.Client usage in edge cases (e.g. fully dynamic URL), it remains legal to instantiate a standard JAX-RS Client alongside Cyrano — the two coexist.
Known pitfalls
-
module-info.java— remember to addrequires io.vidocq.cyrano.mp.rest.client.api;andopens com.example.dto to jakarta.json.bind;for the DTOs. This is the number-one source ofInaccessibleObjectException. -
Spec repackage — do not import
microprofile-rest-client-apidirectly (automatic module → jlink-incompatible). Always go throughcyrano-mp-rest-client-api. -
MP Config is required for
<configKey>/mp-rest/url— without Ravel (or another impl), only@RegisterRestClient(baseUri=…)works. -
Async + CDI context —
@RequestScopedpropagation in aCompletionStageis not yet complete (see TCK §AsyncMethodTest). Prefer synchronous calls on a virtual thread until M4-6 ships.
Going further
-
Getting started — first typed client in under 50 lines.
-
Concepts — MP Rest Client vocabulary.
-
TCK — current conformance status.