[REQ] New Jakarta+Eclipse JAX-RS templates
Created by: bmarwell
Is your feature request related to a problem? Please describe.
This feature requests is intended to get another, completely different implementation of the current jax-rs one.
The current implementation depends on io.swagger
imports, as well as jackson
as Json provider.
However, with microprofile, new vendor-agnostic APIs have arrived.
Describe the solution you'd like
The new implementation is implementation- and vendor-agnostic. It is "just" a new set of templates which can easily be derived from the existing ones.
-
org.eclipse.microprofile.openapi.annotations
instead ofio.swagger
. -
javax.json
instead ofcom.fasterxml.jackson
.
Benefits: Most applicaiton servers, like OpenLiberty, already ship those MicroProfile standards. When not using this generator, we could ship our applications without jackson and/or swagger dependencies.
The new dependencies are:
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
<scope>provided</scope>
</dependency>
<!-- JSON-B API -->
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<!-- JSON API -->
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>1.1.6</version>
<scope>provided</scope>
</dependency>
<!-- OpenAPI -->
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>1.1.2</version>
<scope>provided</scope>
</dependency>
Optional: Instead of javax, prefer the new jakarta namespace:
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
<scope>provided</scope>
</dependency>
Describe alternatives you've considered
Using the current "jax-rs" implementation which is in fact "non-jakarta jax-rs plus Jackson plus swagger". Bloats the war file due to shipping jackson and swagger
Additional context
- Guide from openliberty, which works in fact for every microprofile server: https://openliberty.io/guides/microprofile-openapi.html
- Json-B (Json Binding API): http://json-b.net/ https://jakarta.ee/specifications/jsonb/
- Json-P (Json Parser API): https://github.com/eclipse-ee4j/jsonp https://eclipse-ee4j.github.io/jsonp/