-
-
Notifications
You must be signed in to change notification settings - Fork 64
Read group documentation from document tags. #887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
5765877
bedec17
28b07d0
b8c6329
dd0f73b
5c2e184
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
DJ4ddi marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ public void Can_Generate_Interface_Doc_Without_Linebreaks() | |
| { | ||
| var docs = new StringBuilder(); | ||
| var interfaceDefinition = new OpenApiOperation { Summary = "Test", }; | ||
| this._generator.AppendInterfaceDocumentation(interfaceDefinition, docs); | ||
| this._generator.AppendInterfaceDocumentation(new OpenApiDocument(), interfaceDefinition, docs); | ||
| docs.ToString().Trim().Should().Be("/// <summary>Test</summary>"); | ||
| } | ||
|
|
||
|
|
@@ -31,12 +31,25 @@ public void Can_Generate_Interface_Doc_With_Linebreaks() | |
| { | ||
| var docs = new StringBuilder(); | ||
| var interfaceDefinition = new OpenApiOperation { Summary = "Test\n", }; | ||
| this._generator.AppendInterfaceDocumentation(interfaceDefinition, docs); | ||
| this._generator.AppendInterfaceDocumentation(new OpenApiDocument(), interfaceDefinition, docs); | ||
| docs.ToString().Trim().Should().NotBe("/// <summary>Test</summary>"); | ||
| docs.ToString().Trim().Should().Contain("<summary>") | ||
| .And.Contain("Test"); | ||
| } | ||
|
|
||
| [Test] | ||
| public void Can_Generate_Interface_Doc_From_Controller_Tag() | ||
| { | ||
| var docs = new StringBuilder(); | ||
| var interfaceDefinition = new OpenApiOperation { Summary = "Test", Tags = ["TestController"] }; | ||
| var controllerTag = new OpenApiTag { Name = "TestController", Description = "TestControllerDescription" }; | ||
| var document = new OpenApiDocument { Tags = [controllerTag] }; | ||
|
|
||
| this._generator.AppendInterfaceDocumentation(document, interfaceDefinition, docs); | ||
|
|
||
| docs.ToString().Trim().Should().Be("/// <summary>TestControllerDescription</summary>"); | ||
| } | ||
|
Comment on lines
+40
to
+50
|
||
|
|
||
| [Test] | ||
| public void Can_Generate_Method_Summary() | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.