Forum Discussion
Thanks abonstrom
I'm kinda glad that you experienced the same outcome as me and accept that using HTML2 is a possible solution..... however..
I also need to output/document report text, see below
I have a couple of issues here:
1. The report text formatting is poor, the carriage returns that are visible in the YAML are lost in the WS interpretation. Is there anything I can do here to preserve the carriage returns? Apologies if this is a basic question - I admit that I've C&P'ed the report text into the YAML file / Swagger Editor
2. When I Generate Client > HTML the report text formatting is unacceptable. This relates to issue 1
3. When I Generate Client > HTML2 the report text is lost! Could this be due to the YAML formatting?
At the moment neither Client Generate to HTML or HTML2 gives me what I need (both parameter output and report text output with carriage returns)
Any help appreciated
Thanks
I've found a stack overflow question that helped me break a long string into several lines: https://stackoverflow.com/questions/3790454/how-do-i-break-a-string-in-yaml-over-multiple-lines/21699210
Using the "|" symbol adds a line break to every line in your yaml file so your report is formatted properly in the SwaggerUI.
I looked into the HTML document generation options and it doesn't look like there is any way to edit how the documents are created. The document generators appear to have been created by a company called Reverb (doesn't look like it exists anymore).
One suggestion I have to solve this would be to create your own Swagger Codegen template for HTML. That way you could generate HTML docs based off your OpenAPI documentation.
Hope this helps!
Related Content
- 3 years ago
- 25 days ago
Recent Discussions
- 7 days ago