Skip to content

ServiceProjectReference

Rico Suter edited this page Jul 11, 2019 · 9 revisions

In the web project:

    <OpenApiRetrieveDocuments>true</OpenApiRetrieveDocuments>
    <OpenApiDocumentsDirectory>.</OpenApiDocumentsDirectory>

In the client project:

<ServiceProjectReference
 Include="../MyProjectWithApiMyProjectWithApi.csproj"
 CodeGenerator="NSwagTypescript"
 DocumentPath="MyOtherApi.json"
 Namespace="My.Custom.Namespace"
 ClassName="MyOtherApiClient"
 GenerateNSwagTypeScriptOptions="/template:Angular /OperationGenerationMode:SingleClientFromOperationId /RxJsVersion:6 /UseSingletonProvider:true /InjectionTokenType:InjectionToken" />

PR: https://github.com/RicoSuter/NSwag/pull/2226

You can’t perform that action at this time.