OpenAPITools / OpenAPITools/openapi-generator
API Implementation by default on NativeWebRequest
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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