File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/Microsoft.OpenApi/Models Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -650,7 +650,7 @@ internal void WriteAsItemsProperties(IOpenApiWriter writer)
650
650
/// <param name="writer">The open api writer.</param>
651
651
/// <param name="parentRequiredProperties">The list of required properties in parent schema.</param>
652
652
/// <param name="propertyName">The property name that will be serialized.</param>
653
- internal void SerializeAsV2 (
653
+ internal virtual void SerializeAsV2 (
654
654
IOpenApiWriter writer ,
655
655
ISet < string > parentRequiredProperties ,
656
656
string propertyName )
Original file line number Diff line number Diff line change @@ -227,6 +227,22 @@ public override void SerializeAsV3(IOpenApiWriter writer)
227
227
writer . GetSettings ( ) . LoopDetector . PopLoop < OpenApiSchema > ( ) ;
228
228
}
229
229
230
+ /// <inheritdoc/>
231
+ internal override void SerializeAsV2 (
232
+ IOpenApiWriter writer ,
233
+ ISet < string > parentRequiredProperties ,
234
+ string propertyName )
235
+ {
236
+ if ( ! writer . GetSettings ( ) . ShouldInlineReference ( _reference ) )
237
+ {
238
+ _reference . SerializeAsV2 ( writer ) ;
239
+ }
240
+ else
241
+ {
242
+ base . SerializeAsV2 ( writer , parentRequiredProperties , propertyName ) ;
243
+ }
244
+ }
245
+
230
246
/// <inheritdoc/>
231
247
public override void SerializeAsV2 ( IOpenApiWriter writer )
232
248
{
You can’t perform that action at this time.
0 commit comments