Skip to content

[BUG][JAVA] Regression on Java webclient generation with 7.9.0 #20459

@nvervelle

Description

@nvervelle

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • 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

See first slack thread and second slack thread

When trying to upgrade from openapi-generator 7.8.0 to 7.9.0, I end up with a result that doesn't compile for one specification :

  • I'm using Java webclient generation
  • The generated api.xxxApi classes include an import of dto.OneOf, but there's no dto package and no OneOf class/interface generated
  • The openapi specification I'm using is adapted from this one (removed a few things we don't need, cleaned...). I'm attaching the actual specification I'm using.

The only place where I see oneOf in the openapi specification is for errors with references to components that have just a description.

With 7.8.0 :

  • The import is for a correctly named DTO dto.ApiSecureEnvironmentNameGetKeyGet403Response
  • The DTO is actually generated in the dto package

Is this a new bug?
Can it be a side effect of #19781 or #19758 ?

openapi-generator version

It's failing with version 7.9.0, but was working with 7.8.0

OpenAPI declaration file content or url

Put on slack here

Generation Details
Steps to reproduce
Related issues/PRs

It may be a side effect of #19781 or #19758

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