swagger-api / swagger-api/swagger-codegen

Feature request: Don't make Api an inner interface of ApiClient for feign

Open
#5,908 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Java General: Suggestion
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

If you only want to have minimal dependencies for your project by disabling generateSupportingFiles this is currently not really possible due to the internal Api interface included in the ApiClient which is used for generating the Feign Client interfaces as extension.

Swagger-codegen version

2.2.3-SNAPSHOT

Suggest a Fix

Either remove the entire Api interface from the Feign Client interface, because it is empty. If this interface is somehow needed as marker interface it would be great if it could be an extra class of its own - so it could be added to the supportingFilesToGenerate to keep the number of needed dependencies as small as possible.

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

The request concerns the generated Feign ApiClient, its inner Api interface, and supportingFilesToGenerate. Start by tracing the Feign generation entry point and how supporting files are selected. Done means the empty Api interface is removed or independently selectable, with the generated client output verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.