swagger-api / swagger-api/swagger-codegen

[Java] Support enums in path params

Open
#2,282 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Similar to #1347, it would be good to also add support of enums in path parameters.

One additional requirement: It would be good if multiple query and/or path parameters actually reference the same enumeration, that only one enumeration is generated and is then being referenced from all places where it was defined.

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

Start by reading issue #1347 and tracing how the Java generator currently handles path and query parameters. The work is done when enum-valued path parameters are supported and repeated references to the same enumeration produce one generated enumeration reused from every applicable location.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.