swagger-api / swagger-api/swagger-codegen
[spring] descriptions for requestBody do not seem to generate properly
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
an example of a path I have in my yaml is
paths:
/shipment/create:
post:
description: |
## This call will create a shipment
requestBody:
description: |
**Required information**
---
> * Information 1
> * Information 2
> * Information 3
> * Information 4
---
and how that gets generated in the Api interface is
ResponseEntity<Object> createShipment(@ApiParam(value = "**Required information**
---
> * Information 1
> * Information 2
> * Information 3
> * Information 4
---
" ,required=true ) @Valid @RequestBody ShipmentBasicInfoResponse body);
This will obviously not work without reformatting it to
ResponseEntity<Object> createShipment(@ApiParam(value = "**Required information** --- > * Information 1 > * Information 2 > * Information 3 > * Information 4 --- " ,required=true ) @Valid @RequestBody ShipmentBasicInfoResponse body);
This is being generated through swaggerhub. The only codegen option that has been changed was hideGenerationTimestamp = true.
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
Start by reproducing the issue with the YAML example and the generated Spring Api interface shown in the report. No source file or test is named, so locate the Spring generator's requestBody description handling and inspect the generated annotation output. Done means multiline Markdown descriptions produce valid, usable generated Java annotations without manual reformatting.
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
- Mostly clear
- Newbie friendliness
- 32/100