Uh oh!
There was an error while loading. Please reload this page.
Adds support for generating Mermaid diagrams from APIs - #1113
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| catch (Exception ex) | ||
| { | ||
| #if DEBUG | ||
| logger.LogCritical(ex, ex.Message); | ||
| throw; // so debug tools go straight to the source of the exception when attached | ||
| #else | ||
| logger.LogCritical( ex.Message); | ||
| return 1; | ||
| #endif | ||
| } |
Check notice
Code scanning / CodeQL
Generic catch clause
| writer.WriteLine(); | ||
| writer.WriteLine("OpenAPI: " + openapi); | ||
| writer.WriteLine(@"<div>"); |
Check notice
Code scanning / CodeQL
Generic catch clause
Vincent Biret (baywet)
left a comment
There was a problem hiding this comment.
a couple of comments on top of the ones already provided by codeql.
Also it seems you created your branch from master. I'd suggest rebasing from vnext for history sanity.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Darrel (darrelmiller)
commented
Dec 25, 2022
Vincent Biret (@baywet) You tricked me with that .Order() method. It doesn't exist. At least my version of .NET doesn't know about it. I put the .OrderBy( o=>o) back. |
Vincent Biret (baywet)
commented
Dec 28, 2022
Darrel (@darrelmiller) ah right! it's an addition of .net 7, sorry about that, I'm in the future. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
ff54122 to
5d87820CompareDarrel (darrelmiller)
commented
Jan 3, 2023
OMG. I rebased successfully for the first time ever. |
Vincent Biret (baywet)
left a comment
There was a problem hiding this comment.
Good job on the rebase, I hope you used the CLI :P
Darrel (darrelmiller)
commented
Jan 4, 2023
Vincent Biret (@baywet) The git CLI, yes. I was lucky because there were no merge conflicts. |
Code coverage metric achieved. :-) /cc Maggie Kimani (@MaggieKimani1)Vincent Biret (@baywet) |
Uh oh!
There was an error while loading. Please reload this page.
Vincent Biret (baywet)
commented
Jan 12, 2023
good job on the coverage. I encourage you to check the code smells to wrap this up (+ the comment I left) https://sonarcloud.io/project/issues?id=microsoft_OpenAPI.NET&pullRequest=1113&resolved=false&types=CODE_SMELL |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Darrel (darrelmiller)
commented
Jan 15, 2023
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Because the issue was addressed
Kudos, SonarCloud Quality Gate passed! |









Added a show command to the hidi command line and also added a WriteMermaid function to the OpenApiUriTreeNode class.
Examples of the output are here https://github.com/darrelmiller/openapi-collection/tree/main/ApiDiagrams
The show command wraps the mermaid in a markdown file with a legend to explain the coloring of the nodes. Each node is styled with a color that maps to the set of HTTP methods that are supported. This mapping is defined by the MermaidColorScheme dictionary on OpenApiUriTreeNode. That dictionary can be customized to change the colors or add new combinations of HTTP methods.
GitHub markdown does not render the HTML legend that the show command emits. However, the VS code markdown preview does.
This closes#820