|
Grimm is at |
On the application code side, migration is trivial: Grimm strictly consumes the standard org.eclipse.microprofile.openapi.annotations.* annotations. No proprietary import to replace. The gaps lie in configuration and packaging.
From SmallRye OpenAPI
SmallRye OpenAPI is the reference implementation in Quarkus and several Jakarta EE servers. Migration is direct — Grimm targets strict conformance to the same spec.
| SmallRye OpenAPI | Grimm | Note |
|---|---|---|
Annotations |
Same annotations |
No application code change. |
Classpath scan at startup |
Scan via Vauban BCE at startup |
Same semantics. Neither does per-request scanning. |
|
|
Identical. YAML/JSON content negotiation identical. |
|
|
Overrides, exclusions, filters, model reader: identical. |
Dependencies: Jandex, SnakeYAML, Jackson, etc. |
None (hand-written serializers) |
Reduced classpath footprint. Immediate jlink compatibility. |
|
Fixed |
To publish on another path, add a JAX-RS alias in the application. |
From Quarkus OpenAPI
Quarkus OpenAPI sits on top of SmallRye OpenAPI but adds proprietary extensions.
| Quarkus OpenAPI | Grimm | Note |
|---|---|---|
Build-time scanning via Jandex |
Runtime scanning via Vauban BCE (at startup, not per request) |
Equivalent startup-latency cost. No Jandex index to maintain. |
|
|
Prefer the portable annotation. |
|
|
Prefer the portable annotation. |
Built-in Swagger UI |
Out of scope for Grimm |
Wire Swagger UI or Redoc on the application side as a static resource. |
|
No Dev Mode equivalent |
The cycle is |
Gotchas
-
No hot classpath scan — Grimm does not expose hot document refresh (the MP OpenAPI spec does not require it). Any annotation change requires a restart.
-
No
setAccessible(true)— if application code relied on non-public classes accessed by a permissive scanner, Grimm will not reach them. Open packages in the application’smodule-info.javaor make the typespublic. -
Strict YAML — the hand-written YAML serializer emits strict 1.2. Some lax YAML clients (legacy browsers) may want different indentation. When in doubt, prefer JSON.
-
mp.openapi.servers— the override replaces the document’sserverslist entirely (spec behaviour). For a merge, go through anOASFilter.
Porting checklist
-
Declare
grimm-core+grimm-cdi-vaubaninstead of SmallRye / Quarkus OpenAPI. -
Audit application annotations: they must all come from
org.eclipse.microprofile.openapi.annotations.*. Replace any proprietary annotation. -
Migrate
quarkus.smallrye-openapi.properties to@OpenAPIDefinition/@SecurityScheme/@Serverormp.openapi.keys. -
Run
./mvnw testthen./run-official-tck-mp-openapi-4.1.sh(see TCK). -
Diff the produced document before/after — verify
info,servers,paths,components/schemas. -
Wire Swagger UI or Redoc on the application side if needed.