Skip to content

OpenApiStreamReader disposes input stream after reading and it's not configurable #530

@jaceks2106

Description

@jaceks2106

Hi all,

I have to use OpenApiStreamReader as a one of the several steps, of handling the Stream. The problem is, that when I read the stream using OpenApiStreamReader.Read(stream) at first, then the Stream is disposed and cannot be used anymore. I cannot configure anyhow to Read the stream without disposing it, as I can do that in the base StreamReader.

Link - bool leaveOpen

Here is my example reproduction:

// openApiSpec is a Stream argument of the method
var openApiStreamReader = new OpenApiStreamReader();
var openApiDocument = openApiStreamReader.Read(openApiSpec, out var openApiDiagnostic);

Metadata

Metadata

Assignees

Labels

type:enhancementEnhancement request targeting an existing experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions