Skip to content

[BUG][Kotlin][jackson] Missing JsonValue for nested Kotlin Jackson enums #23886

Closed

Description

@tormodatt

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

For Jackson to serialize enum with Int value as an Int in json, @get:JsonValue is required. As we can see in this test, it is missing and it will yield a string in stead. It is included for top level enums, as covered by this test

I'd be happy to create a PR that resolves this if proposed change is accepted.

openapi-generator version

Latest master asserts this in test mentioned above

OpenAPI declaration file content or url

See test link above

Generation Details
Steps to reproduce

Test above

Related issues/PRs
Suggest a fix

tormodatt@4a6f685. I can open a PR with this?

Activity

  1. added 3 commits that reference this issue on Jun 23, 2026
    517a61f
    675af99
    5663d49
  2. added a commit that references this issue on Jun 30, 2026
    25c8dee
  3. added a commit that references this issue on Aug 25, 2026
    cbbbf9b
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