File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/Microsoft.OpenApi/Models Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,16 @@ namespace Microsoft.OpenApi.Models
12
12
/// </summary>
13
13
public class OpenApiReference : IOpenApiSerializable
14
14
{
15
+ /// <summary>
16
+ /// A short summary of the Reference
17
+ /// </summary>
18
+ public string Summary { get ; set ; }
19
+
20
+ /// <summary>
21
+ /// A short description of the reference
22
+ /// </summary>
23
+ public string Description { get ; set ; }
24
+
15
25
/// <summary>
16
26
/// External resource in the reference.
17
27
/// It maybe:
@@ -122,6 +132,8 @@ public OpenApiReference() {}
122
132
/// </summary>
123
133
public OpenApiReference ( OpenApiReference reference )
124
134
{
135
+ Summary = reference ? . Summary ;
136
+ Description = reference ? . Description ;
125
137
ExternalResource = reference ? . ExternalResource ;
126
138
Type = reference ? . Type ;
127
139
Id = reference ? . Id ;
@@ -153,6 +165,12 @@ public void SerializeAsV3(IOpenApiWriter writer)
153
165
}
154
166
155
167
writer . WriteStartObject ( ) ;
168
+
169
+ // summary
170
+ writer . WriteProperty ( OpenApiConstants . Summary , Summary ) ;
171
+
172
+ // description
173
+ writer . WriteProperty ( OpenApiConstants . Description , Description ) ;
156
174
157
175
// $ref
158
176
writer . WriteProperty ( OpenApiConstants . DollarRef , ReferenceV3 ) ;
You can’t perform that action at this time.
0 commit comments