Skip to content

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

@tormodatt

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions