-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for reading summary and example from default type constru…
…ctor.
- Loading branch information
pixellos
committed
Apr 13, 2024
1 parent
c207be7
commit 745db4e
Showing
3 changed files
with
74 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
test/Swashbuckle.AspNetCore.SwaggerGen.Test/Fixtures/XmlAnnotatedRecord.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using Swashbuckle.AspNetCore.TestSupport; | ||
|
||
namespace Swashbuckle.AspNetCore.SwaggerGen.Test | ||
{ | ||
/// <summary> | ||
/// Summary for XmlAnnotatedType | ||
/// </summary> | ||
/// <param name="BoolProperty" example="true">Summary for BoolProperty</param> | ||
/// <param name="IntProperty" example="10">Summary for IntProperty</param> | ||
/// <param name="LongProperty" example="4294967295">Summary for LongProperty</param> | ||
/// <param name="FloatProperty" example="1.2">Summary for FloatProperty</param> | ||
/// <param name="DoubleProperty" example="1.25">Summary for DoubleProperty</param> | ||
/// <param name="EnumProperty" example="2">Summary for EnumProperty</param> | ||
/// <param name="GuidProperty" example="d3966535-2637-48fa-b911-e3c27405ee09">Summary for GuidProperty</param> | ||
/// <param name="StringPropertyWithNullExample" example="null">Summary for Nullable StringPropertyWithNullExample</param> | ||
/// <param name="StringProperty" example="Example for StringProperty">Summary for StringProperty</param> | ||
/// <param name="StringPropertyWithUri" example="https://test.com/a?b=1&c=2">Summary for StringPropertyWithUri</param> | ||
/// <param name="ObjectProperty" example="{"prop1": 1, "prop2": "foobar"}">Summary for ObjectProperty</param> | ||
public record XmlAnnotatedRecord( | ||
bool BoolProperty, | ||
int IntProperty, | ||
long LongProperty, | ||
float FloatProperty, | ||
double DoubleProperty, | ||
IntEnum EnumProperty, | ||
Guid GuidProperty, | ||
string StringPropertyWithNullExample, | ||
string StringProperty, | ||
string StringPropertyWithUri, | ||
object ObjectProperty | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters