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)
96
96
throw Error . ArgumentNull ( nameof ( writer ) ) ;
97
97
}
98
98
99
- if ( Reference != null )
99
+ if ( Reference != null && writer . GetSettings ( ) . ReferenceInline != ReferenceInlineSetting . InlineLocalReferences )
100
100
{
101
101
Reference . SerializeAsV3 ( writer ) ;
102
102
return ;
@@ -161,7 +161,7 @@ public void SerializeAsV2(IOpenApiWriter writer)
161
161
throw Error . ArgumentNull ( nameof ( writer ) ) ;
162
162
}
163
163
164
- if ( Reference != null )
164
+ if ( Reference != null && writer . GetSettings ( ) . ReferenceInline != ReferenceInlineSetting . InlineLocalReferences )
165
165
{
166
166
Reference . SerializeAsV2 ( writer ) ;
167
167
return ;
Original file line number Diff line number Diff line change 5
5
using System . Collections . Generic ;
6
6
using System . IO ;
7
7
using Microsoft . OpenApi . Exceptions ;
8
+ using Microsoft . OpenApi . Models ;
8
9
using Microsoft . OpenApi . Properties ;
9
10
10
11
namespace Microsoft . OpenApi . Writers
@@ -14,6 +15,7 @@ namespace Microsoft.OpenApi.Writers
14
15
/// </summary>
15
16
public abstract class OpenApiWriterBase : IOpenApiWriter
16
17
{
18
+
17
19
/// <summary>
18
20
/// Settings for controlling how the OpenAPI document will be written out.
19
21
/// </summary>
You can’t perform that action at this time.
0 commit comments