Table of Contents

Class OpenApiDocumentFactory

Namespace
Refitter.Core
Assembly
Refitter.Core.dll

Creates an NSwag.OpenApiDocument from a specified path or URL.

public static class OpenApiDocumentFactory
Inheritance
OpenApiDocumentFactory
Inherited Members

Methods

CreateAsync(IEnumerable<string>)

Creates a merged NSwag.OpenApiDocument from multiple paths or URLs. The first document serves as the base; paths and schemas from subsequent documents are merged in.

public static Task<OpenApiDocument> CreateAsync(IEnumerable<string> openApiPaths)

Parameters

openApiPaths IEnumerable<string>

The paths or URLs to the OpenAPI specifications.

Returns

Task<OpenApiDocument>

A merged NSwag.OpenApiDocument.

Exceptions

ArgumentException

Thrown when openApiPaths is null or empty.

CreateAsync(string)

Creates a new instance of the NSwag.OpenApiDocument class asynchronously.

public static Task<OpenApiDocument> CreateAsync(string openApiPath)

Parameters

openApiPath string

The path or URL to the OpenAPI specification.

Returns

Task<OpenApiDocument>

A new instance of the NSwag.OpenApiDocument class.