Skip to content

Error on SerializeAsV2 when InlineLocalReferences = true #850

Closed

Description

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

Activity

  1. added
    priority:p1High priority but not blocking. Causes major but not critical loss of functionality SLA <=7days
    on May 11, 2022
  2. added this to the 1.4 milestone on May 11, 2022
  3. darrelmiller commented on Jul 1, 2022

    @darrelmiller
    Member

    Irvine Sunday (@irvinesunday) Do you have an example that reproduces this? I am unable to repro it.

  4. darrelmiller commented on Jul 4, 2022

    @darrelmiller
    Member

    Closing this. Please re-open if anyone is able to repro.

  5. millicentachieng commented on Aug 15, 2022

    @millicentachieng
    Contributor

    We have the same error occurring in the Open API OData conversion library. I've tracked down the error and created the PR #978 to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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