Skip to content

Commit 7405f3c

Browse files
committed
feat: makes the reference interface covariant
Signed-off-by: Vincent Biret <[email protected]>
1 parent 2bca1df commit 7405f3c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceableWithTarget.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Microsoft.OpenApi.Interfaces
77
/// A generic interface for OpenApiReferenceable objects that have a target.
88
/// </summary>
99
/// <typeparam name="T"></typeparam>
10-
public interface IOpenApiReferenceableWithTarget<T> : IOpenApiReferenceable
10+
public interface IOpenApiReferenceableWithTarget<out T> : IOpenApiReferenceable
1111
{
1212
/// <summary>
1313
/// Gets the resolved target object.

test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ namespace Microsoft.OpenApi.Interfaces
223223
Microsoft.OpenApi.Models.OpenApiReference Reference { get; set; }
224224
bool UnresolvedReference { get; set; }
225225
}
226-
public interface IOpenApiReferenceableWithTarget<T> : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
226+
public interface IOpenApiReferenceableWithTarget<out T> : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
227227
{
228228
T Target { get; }
229229
}

0 commit comments

Comments
 (0)