Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][Kotlin] OK HTTP: collectionDelimiter not imported #20428

Open
5 of 6 tasks
lasher23 opened this issue Jan 9, 2025 · 0 comments
Open
5 of 6 tasks

[BUG][Kotlin] OK HTTP: collectionDelimiter not imported #20428

lasher23 opened this issue Jan 9, 2025 · 0 comments

Comments

@lasher23
Copy link

lasher23 commented Jan 9, 2025

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

If a generated Api Client has a header field with schema array of an enum it uses the method collectionDelimiter which is provided in the infrastructure package (ApiAbstractions.kt)

openapi-generator version

7.10.0

OpenAPI declaration file content or url

Just need an enum array as parameter anywhere.
`
parameters:

  • name: values
    in: header
    required: false
    schema:
    type: array
    description: All goods receipt types that should be sent back to the device
    items:
    type: string
    description: Type of goods receipt request
    enum:
    - MULTIPLE
    - ENUM
    - VALUES
    `
Generation Details

Configure the kotlin generator to use okhttp

Steps to reproduce

Generate any API

Suggest a fix

Add the collectionDelimiter import always, or atleast when using it.
File https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache

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

No branches or pull requests

1 participant