Skip to content

Error on SerializeAsV2 when InlineLocalReferences = true #850

@irvinesunday

Description

@irvinesunday

Serializing an OpenAPI document as V2 throws an error "Value cannot be null. (Parameter 'source')" when InlineLocalReferences = true e.g.,

OpenApiWriterBase writer = new OpenApiYamlWriter(sr,
                        new OpenApiWriterSettings { InlineLocalReferences = true});

The error gets thrown when serializing the OpenAPI document as V2, i.e., OpenApiDocument.SerializeAsV2(writer)

This affects both OpenApiJsonWriter and OpenApiYamlWriter classes.
This affects the latest version of Microsoft.OpenAPI.Readers v1.3.1

Metadata

Metadata

Labels

priority:p1High priority but not blocking. Causes major but not critical loss of functionality SLA <=7daystype:bugA broken experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions