swagger-api / swagger-api/swagger-codegen
[HTML] Multi-line examples aren't displayed multi-line
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Multi-line example return data isn't displayed as multi-line.
Swagger-codegen version
2.2.1
Swagger declaration file content or url
---
swagger: '2.0'
info:
version: 0.0.0
title: Simple API
paths:
/:
responses:
200:
description: OK
schema:
type: string
example: |
foo
bar
Expected Result:
"foo bar"
Result:
"foo\nbar\n"
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
Use the supplied Swagger 2.0 declaration as the reproduction case, focusing on the HTML output for the multi-line string example. Compare the expected and actual rendering, then verify that the generated result preserves the line break without the extra trailing newline; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, yaml
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100