swagger-api / swagger-api/swagger-codegen

Disable generation of default interface method

Open
#8,378 0 comments 10 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

I have <interfaceOnly>true</interfaceOnly> so its not generating implementation of interface. However I see it does generate default implementation in controller interface itself for spring project. How can I disable generation of default interface method and just have definition in interface and not default implementation.

Swagger-codegen version

swagger-codegen-maven-plugin 2.3.1

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 with the swagger-codegen-maven-plugin configuration and the generated Spring controller interface behavior described in the issue. Trace how interfaceOnly=true affects generated interfaces, then check the relevant generation templates or entry points. Done means the controller interface contains only method definitions, without default implementations, while the requested interface-only behavior remains intact.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.