swagger-api / swagger-api/swagger-codegen

[JAVA] Bug default methods with implementation are generated with <java8> true flag and are not generated without it

Open
#7,988 0 comments 4 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

Hi there, tried to generate code with <java8>true<java8> in order to get rid of threeten LocalDate class and faced with the problem that default implementation was generated in the API interface.

There is a difference that with without flag default methods are not generated and with it they are.

The question is:
is there a flag or property in configOptions to disable/enable generation of default methods

Swagger-codegen version

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 by reproducing the Java generation behavior on swagger-codegen 2.3.1 with and without the true setting, then inspect the Java generator's configOptions handling and templates. Done means the behavior of default-method generation is explicitly controlled as requested and the differing generated API interface output is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
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.