Skip to content

[BUG] [Kotlin] Enums generated for kotlinx serialization fails deserialization #22100

@daniel-waiguru

Description

@daniel-waiguru

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

Enums generated for kotlinx serialization are marked as @contextual, causing failures in json deserialization

openapi-generator version

7.16.0

OpenAPI declaration file content or url
openapi: 3.0.4
info:
  title: test
  version: 1.0.0
tags:
  - name: test
paths: {}
components:
    schemas:
     XYZType:
         type: string
         enum:
              - "ONE"
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