Skip to content

[BUG][Java][x-implements] Generated inner-enum lack implements #23083

Open

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

Inner enums lack implements, while outer/standalone does not.
Discovered here: Chrimle/openapi-to-java-records-mustache-templates#578
Same root cause as #23082

openapi-generator version

7.20.0

OpenAPI declaration file content or url
components:
  schemas:
    ExampleWithInnerEnums:
      type: object
      description: Example with inner enum class
      properties:
        exampleInner:
          type: string
          description: Example of an inner enum class
          x-implements:
            - TestInterface
          enum:
            - ENUM1
            - ENUM2
            - ENUM3

Generates:

  @JsonAdapter(ExampleInnerEnum.Adapter.class)
  public enum ExampleInnerEnum {

But should be:

  @JsonAdapter(ExampleInnerEnum.Adapter.class)
  public enum ExampleInnerEnum implements TestInterface {
Generation Details

Library: java

Steps to reproduce
Related issues/PRs
Suggest a fix

Activity

  1. KannaKim commented on Jul 18, 2026

    @KannaKim
    Contributor

    Is this still ongoing issues? I was not able to reproduce the issue with the spec given above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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