Skip to content

Commit 62b7e63

Browse files
The OpenApiStreamReader.ReadFragment method may only read fragments that are externally referencable, i.e. implement IOpenApiReferenceable
1 parent dda0fe4 commit 62b7e63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public OpenApiDocument Read(Stream input, out OpenApiDiagnostic diagnostic)
4545
/// <param name="version">Version of the OpenAPI specification that the fragment conforms to.</param>
4646
/// <param name="diagnostic">Returns diagnostic object containing errors detected during parsing</param>
4747
/// <returns>Instance of newly created OpenApiDocument</returns>
48-
public T ReadFragment<T>(Stream input, OpenApiSpecVersion version, out OpenApiDiagnostic diagnostic) where T : IOpenApiElement
48+
public T ReadFragment<T>(Stream input, OpenApiSpecVersion version, out OpenApiDiagnostic diagnostic) where T : IOpenApiReferenceable
4949
{
5050
using (var reader = new StreamReader(input))
5151
{

0 commit comments

Comments
 (0)