Skip to content

[False-Positive][BUG][Java] Corrupted Java Imports & POM Dependencies of com.fasterxml.jackson #23166

@Chrimle

Description

@Chrimle

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Most com.fasterxml.jackson occurrences were wrapped in mustache-variables as part of #23023. After this, most Java generators fail to populate this variable, leading to null/empty.

This results in java imports like;

// Expected
import com.fasterxml.jackson.databind.util.StdDateFormat;
// Actual
import .databind.util.StdDateFormat;

This also results in pom.xml dependency declarations like;

<!-- Expected -->
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>${jackson-version}</version>
</dependency>
<!-- Actual -->
<dependency>
  <groupId>.core</groupId>
  <artifactId>jackson-core</artifactId>
  <version>${jackson-version}</version>
</dependency>
openapi-generator version

#23023

OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix

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