Skip to content

Commit fa9306f

Browse files
committed
Remove method from interface to prevent a breaking change
1 parent e3e8fc7 commit fa9306f

File tree

2 files changed

+1
-35
lines changed

2 files changed

+1
-35
lines changed

src/Microsoft.OpenApi/Writers/IOpenApiWriter.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

4-
using Microsoft.OpenApi.Models;
5-
64
namespace Microsoft.OpenApi.Writers
75
{
86
/// <summary>
@@ -74,13 +72,5 @@ public interface IOpenApiWriter
7472
/// Flush the writer.
7573
/// </summary>
7674
void Flush();
77-
78-
/// <summary>
79-
/// Writes out existing examples in a mediatype object
80-
/// </summary>
81-
/// <param name="writer"></param>
82-
/// <param name="example"></param>
83-
/// <param name="version"></param>
84-
void WriteV2Examples(IOpenApiWriter writer, OpenApiExample example, OpenApiSpecVersion version);
8575
}
8676
}

src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Collections.Generic;
66
using System.IO;
77
using Microsoft.OpenApi.Exceptions;
8-
using Microsoft.OpenApi.Models;
98
using Microsoft.OpenApi.Properties;
109

1110
namespace Microsoft.OpenApi.Writers
@@ -406,28 +405,5 @@ protected void VerifyCanWritePropertyName(string name)
406405
string.Format(SRResource.ObjectScopeNeededForPropertyNameWriting, name));
407406
}
408407
}
409-
410-
/// <inheritdoc/>
411-
public void WriteV2Examples(IOpenApiWriter writer, OpenApiExample example, OpenApiSpecVersion version)
412-
{
413-
writer.WriteStartObject();
414-
415-
// summary
416-
writer.WriteProperty(OpenApiConstants.Summary, example.Summary);
417-
418-
// description
419-
writer.WriteProperty(OpenApiConstants.Description, example.Description);
420-
421-
// value
422-
writer.WriteOptionalObject(OpenApiConstants.Value, example.Value, (w, v) => w.WriteAny(v));
423-
424-
// externalValue
425-
writer.WriteProperty(OpenApiConstants.ExternalValue, example.ExternalValue);
426-
427-
// extensions
428-
writer.WriteExtensions(example.Extensions, version);
429-
430-
writer.WriteEndObject();
431-
}
432408
}
433409
}

0 commit comments

Comments
 (0)