Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #6881
Closed
Open
Issue created Jul 07, 2020 by Administrator@rootContributor

[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 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

  • 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/
Assignee
Assign to
Time tracking