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
  • #7095
Closed
Open
Issue created Jul 31, 2020 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG][jaxrs-spec] When using the "jackson" option to disable use of Jackson, some jackson annotations and imports are still generated

Created by: ruedigerk

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

When using the jaxrs-spec server generator with the option "jackson" set to "false", I expect the generated code to not contain any imports or annotations referring to Jackson. Instead the code is generated with many Jackson annotations. This can be seen when using the test spec "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml" as input, for example in generated class FormatTest.java.

It is also evident, when looking at the template files, that use Jackson unfenced:

In modules/openapi-generator/src/main/resources/JavaJaxRS/spec:

  • enumClass.mustache
  • enumOuterClass.mustache
  • pojo.mustache
  • pom.mustache

And in:

  • modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache
openapi-generator version

Latest 5.0.0-SNAPSHOT

Suggest a fix

I will open a PR with the fix.

Assignee
Assign to
Time tracking