swagger-api / swagger-api/swagger-codegen

@RequestBody is not generating in spring boot

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

default ResponseEntity postCall(@ApiParam(value = "Request to register call. Either creates a new call or updates an existing call." ,required=true ) @Valid @RequestBody registerCall,@ApiParam(value = "Bearer token that needs to be passed which is generated post user authentication" ,required=true) @RequestHeader(value="authorization", required=true) String authorization,@ApiParam(value = "Client or Partner’s Application Key" ,required=true) @RequestHeader(value="x-app-key", required=true) String xAppKey,@ApiParam(value = "Mandatory parameter to identify the hotel code where the end user is logged in" ,required=true) @RequestHeader(value="x-hotelid", required=true) String xHotelid,@ApiParam(value = "External system code." ) @RequestHeader(value="x-externalsystem", required=false) String xExternalsystem) {
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {

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 generated Spring Boot method shown in the issue and trace the repository's template-driven server-stub generation for this method signature. Reproduce the case from the supplied snippet and verify that the generated parameter includes the expected @RequestBody annotation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
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.