swagger-api / swagger-api/swagger-codegen

[Kotlin] Improve client generator functionality

Open
#5,730 8 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Kotlin Enhancement: General help wanted
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

This is a tracking issue for adding functionality to the Kotlin client generator.

  • Support "default" responses. Currently 200 OK isn't handled, for example, in PetApi#addPet. Revisit this. It appears to be an issue with the petstore.yaml used by most generators, which doesn't define a 200 or "default" response for PetApi#addPet.
  • Support enum type generation (see #5769)
  • Support inline/embedded enums (see #5769)
  • Add model tests for top-level enums and inline/embedded enums
  • Support collectionFormat (multi) (see #5792)
  • Test/Implement arrays of maps, arrays, objects
  • Test/Implement maps of arrays/maps, objects
  • Support allOf via composition
  • Support allOf via inheritance
  • (optional?) Per-request modification of headers,authorization
    • NOTE: ApiClient.defaultHeaders can be modified once to globally set headers for auth, user-agent, etc.
    • Test, or better implement basic auth support
    • Test, or better implement OAuth support
    • Test, or better implement apiKey auth
  • Generate Api tests
  • Generate Model tests
  • Generate Api docs (see #5731)
  • Generate Model docs (see #5731)
  • Update README.md to be more project-specific rather than generic information about the generator/template (see ##5731)
  • Consider an option for android targeting (--additional-properties=android=true), to use built-in serialization and other features
  • Add support for Retrofit library (Ref: https://github.com/swagger-api/swagger-codegen/issues/6368)
  • Add an option to select date library (Ref: #6892)
Related issues
  • #5071

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the unchecked items in the Kotlin client generator tracking list, starting with the existing PetApi#addPet response behavior and the referenced enum and collectionFormat issues. Then inspect the generator's existing API and model test coverage, including the requested tests for top-level and inline enums, arrays, maps, authentication, and generated documentation. Done means selecting a focused item and adding its implementation and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.