File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ public void SerializeAsV3(IOpenApiWriter writer)
9696 throw Error . ArgumentNull ( nameof ( writer ) ) ;
9797 }
9898
99- if ( Reference != null )
99+ if ( Reference != null && writer . GetSettings ( ) . ReferenceInline != ReferenceInlineSetting . InlineLocalReferences )
100100 {
101101 Reference . SerializeAsV3 ( writer ) ;
102102 return ;
@@ -161,7 +161,7 @@ public void SerializeAsV2(IOpenApiWriter writer)
161161 throw Error . ArgumentNull ( nameof ( writer ) ) ;
162162 }
163163
164- if ( Reference != null )
164+ if ( Reference != null && writer . GetSettings ( ) . ReferenceInline != ReferenceInlineSetting . InlineLocalReferences )
165165 {
166166 Reference . SerializeAsV2 ( writer ) ;
167167 return ;
Original file line number Diff line number Diff line change 55using System . Collections . Generic ;
66using System . IO ;
77using Microsoft . OpenApi . Exceptions ;
8+ using Microsoft . OpenApi . Models ;
89using Microsoft . OpenApi . Properties ;
910
1011namespace Microsoft . OpenApi . Writers
@@ -14,6 +15,7 @@ namespace Microsoft.OpenApi.Writers
1415 /// </summary>
1516 public abstract class OpenApiWriterBase : IOpenApiWriter
1617 {
18+
1719 /// <summary>
1820 /// Settings for controlling how the OpenAPI document will be written out.
1921 /// </summary>
You can’t perform that action at this time.
0 commit comments