Swagger File
swagger: '2.0'
info:
title: Sample
version: "1.0.0"
produces:
- application/json
paths:
/range:
get:
summary: Gets Random Range
description: |
This is an example of a working multiline.
You can see that this is on a separate line.
Which is very much unlike what is seen below with the description of the RangeObject.
responses:
200:
description: Success
schema:
$ref: '#/definitions/RangeObject'
definitions:
RangeObject:
type: object
description: |
Example implementation specification:
{start}-{end} Start at {start}, end at {end}
{start} Start at {start}, end at the end of the current paragraph
properties:
start:
type: integer
end:
type: integer
required:
- start
Issue
The description for the RangeObject isn't showing with multiple lines. All the lines are concatenated together with a space, which makes it very hard to read. The multiline syntax is working elsewhere.
Verified the issue exists.
@webron This issue still exists.
Same effect occurs for all types of definition. Object, string, integer, enum,...
@aleksei-saharov - well, in our defense, we never said it was fixed.
@webron I agree, but I try to tell that it take place for all definition types. Not only type: object
I faced with it today.
Got it, thanks.
@webron When can we expect it to get fixed?
We're working on a major update and that's where our focus lies, so unlikely before then. I don't have an ETA for the update though.
This should no longer be an issue with the new editor.
@webron but it is!
Try to check @cjbarth example
I have checked it with editor.swagger.io and got following result

Did you test it before closing?
@aleksei-saharov I did not. I had to go through ~300 tickets, I don't have the capacity to test every single one of them. Sometimes, tickets were wrongfully closed. However, this issue is covered by https://github.com/swagger-api/swagger-ui/issues/2745. I believe there might be another ticket in the UI, but I can't find it right now.
I just ran into this so I can confirm it exist but its a bit complicated. Since its at the top of the google results I'll provide a little more information for future people https://xkcd.com/979/
Because this is so specific it might not even be a bug but here's the details:
1) Its in swagger-ui not the editor specifically because just pointing the ui to a spec triggers this.
2) It only happens if there are no markdown control characters in the description.
3) It only seems to be the path description? Models like the one in the example seem to work fine now.
Path spec
description: |
# Header
Line 1
Line 2
Output:
# Header
Line 1Line 2
Path spec:
description:
Line 1
Line 2
Output:
Line 1 Line 2
To start a line just add # in front of the it.
/pet/findByTags:
get:
tags:
- pet
summary: Add a new pet
description: |
### Muliple tags can be provided with comma separated strings.
### test line.
#### line 3
Most helpful comment
I just ran into this so I can confirm it exist but its a bit complicated. Since its at the top of the google results I'll provide a little more information for future people https://xkcd.com/979/
Because this is so specific it might not even be a bug but here's the details:
1) Its in swagger-ui not the editor specifically because just pointing the ui to a spec triggers this.
2) It only happens if there are no markdown control characters in the description.
3) It only seems to be the path description? Models like the one in the example seem to work fine now.
Examples:
Correct rendering
Path spec
Output:
"Incorrect" rendering
Path spec:
Output: