swagger2markup icon indicating copy to clipboard operation
swagger2markup copied to clipboard

Generated example response qoute is formatted badly

Open alkemann opened this issue 7 years ago • 6 comments

If asked to generated markdown with json example code, it creates this:

``` json :

{

instead of this

```json {

Swagger2Markup version: 1.3.1

alkemann avatar Jul 07 '17 07:07 alkemann

I have found out that the problem is a bit hard to fix. In delimitedBlockText the newline is always added after ``` which I cant find a good way to make it only do if the block is a type with a language hint. Because where this is called we dont really have the information of if language typehing is included. Ideas?

alkemann avatar Jul 10 '17 14:07 alkemann

I release now that this issue is on the wrong project also. I didnt know it was this split up. Here is link to relevant code: https://github.com/Swagger2Markup/markup-document-builder/blob/master/src/main/java/io/github/swagger2markup/markup/builder/internal/markdown/MarkdownBuilder.java#L125

alkemann avatar Jul 10 '17 14:07 alkemann

@RobWin imho this is a bug, not "enhancement". Where does the "\n<type>:\n" concept come from?

alkemann avatar Oct 09 '17 08:10 alkemann

I agree with @alkemann that this is a bug. This pretty much generated a broken markdown text that's not compliant with any Markdown editors/parsers out there.

wyyang avatar Jan 24 '18 01:01 wyyang

Hi, isn't this fixed in Swagger2Markup v1.3.2?

RobWin avatar Jan 24 '18 07:01 RobWin

As far as I remember, we have fixed this, but I forgot to close the issue. Should have been fixed in this PR: https://github.com/Swagger2Markup/markup-document-builder/pull/28

RobWin avatar Jan 24 '18 07:01 RobWin