swagger-api / swagger-api/swagger-codegen

[JAVA] Why does Jetty create Services for top level domain and not tags

Open
#6,218 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

While generating server impl stubs for Java Jax-RS using Jetty I have found that swagger-codegen will only generate seperate Service classes if I change the top level url route. My url definitions all lie under one top level route because of the data structure. this means I am endings up with one huge ApiServiceImpl class. I have tried this with Python and then I get controllers based on the tags with which I define the routes with (no route has two tags). Is this as designed or a bug?

Swagger-codegen version

2.2.3

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 comparing Java JAX-RS server stub generation with the Python controller generation described in the issue, focusing on how top-level routes and tags determine generated classes. The issue names no files or tests; done means establishing whether Java Jetty should create services from tags and documenting or correcting the behavior for swagger-codegen 2.2.3.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
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.