swagger-api / swagger-api/swagger-codegen

[Java][Spring][Server] When java8 and interfaceOnly are true, generated interface default methods

Open
#8,045 1 comment 9 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

In issue #5895 is a discussion about generation default methods when parameter java8=true and interfaceOnly=true.
I don't understand the value of this default methods, it is clearer only generating a plain interface and have to implement this defined methods in my implementation.
There is imho no usecase to throw an not_implemented http code, a compile error in the projects is error enough.
@wing328 what do you think ?

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 #5895 and the Java/Spring server generation paths that handle the java8 and interfaceOnly options. Confirm the intended behavior with the existing discussion, then define completion as generating plain interfaces without default methods when both options are true; the payload names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend-api-design, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.