OpenAPITools / OpenAPITools/openapi-generator

API Implementation by default on NativeWebRequest

Open
#14,622 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Announcement
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Hi Team,
I was trying to generate the code form Sample yaml. Code is generated successfully but API implementation is only having only and other method is missing. Also generated class is annotated by @Controller where I want @RestController
public class PetApiController implements PetApi {

private final NativeWebRequest request;

@Autowired
public PetApiController(NativeWebRequest request) {
    this.request = request;
}

@Override
public Optional<NativeWebRequest> getRequest() {
    return Optional.ofNullable(request);
}

}

Please can someone help how can I remove NativeWebRequest and annotate my controller with @RestController

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

Reproduce generation from the sample YAML and inspect the generated PetApiController output, including its NativeWebRequest field and controller annotation. The issue names no source file or test; done means the generated API implementation includes the expected methods and uses the requested controller setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi, spring
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.