Skip to content

[REQ] New Jakarta+Eclipse JAX-RS templates #6881

Open
@bmarwell

Description

@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 of io.swagger.
  • javax.json instead of com.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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions