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
  • #2018
Closed
Open
Issue created Jan 29, 2019 by Administrator@rootContributor0 of 6 checklist items completed0/6 checklist items

[Java][jaxrs 2.1/resteasy] compilation error because of @PATCH

Created by: tnmtechnologies

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

By default, @PATCH annotation is resolved to package io.swagger.jaxrs.* . PATCH annotation was not part of jaxrs 2.0 specifications ( https://jax-rs.github.io/apidocs/2.1/ ) but it is now part of jaxrs 2.1 specifications (https://jax-rs.github.io/apidocs/2.1/).

Compilation with jaxrs 2.1 leads to a compilation failure because of imports with wild cards for both packages io.swagger.jaxrs.* and javax.ws.rs.* .

openapi-generator version

3.3.3

OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce

The issue occurs when we upgrade our thorntail dependency from 2.2.0 (2.2.0) to 2.3.0 (jarxrs 2.1).

Related issues/PRs
Suggest a fix

The suggested fix is to replace @PATCH in the generated source code by @io.swagger.jaxrs.PATCH. By the way, the generated source will compile for any jaxrs version.

As a work around, we use the com.google.code.maven-replacer-plugin:replacer maven plugin in order to update the generated source code on the fly. Of course we have to apply it everywhere @PATCH is generated.

Assignee
Assign to
Time tracking