Skip to content

Add the ability to read OpenAPI description fragments #256

Closed

Description

@darrelmiller

In the work that I am doing to support Swashbuckle and Azure API Management I have run into scenarios where I need to parse a string of OAS compatible text into a some IOpenAPIElement. For Examples I need to create an IOpenApiAny instance. For schema fragments I need to create an OpenApiSchema from a string.
I am working on PR and will link to this issue when I push it.

Currently I am attempting to create a new method on OpenApiStreamReader that looks like:

       public T ReadFragment<T>(Stream input, OpenApiSpecVersion version, out OpenApiDiagnostic diagnostic) 
                   where T : IOpenApiElement, new()
        { … }
      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions