question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[REQ] New Jakarta+Eclipse JAX-RS templates

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:14
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Krabbeecommented, Apr 26, 2022

Hi, is there any updates on Jakarta upgrade?

0reactions
sans17commented, Sep 13, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Jakarta RESTful Web Services
A resource class is a Java class that uses JAX-RS annotations to implement a corresponding Web resource. Resource classes are POJOs that have...
Read more >
Jakarta RESTful Web Services - Quarkus
Generate an automatic response using the metadata provided by the JAX-RS annotations on the matching class and its methods. 3.4. URI Templates.
Read more >
Tutorial: Developing a Simple Web Service With Jakarta EE 8
To access Jakarta RESTful Web Services (JAX-RS) resources, preface the service name ... To create the class, create a new Java class named...
Read more >
Chapter 2. Developing Jakarta RESTful Web Services Web ...
Application class to create a subclass that declares those providers and web resources. This class is provided by the RESTEasy libraries included with...
Read more >
Chapter 3. JAX-RS Application, Resources and Sub-Resources
This chapter presents an overview of the core JAX-RS concepts - resources and ... URI path templates are URIs with variables embedded within...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found