问题描述
我想知道如何重命名生成的swagger.json
当我通过“添加新的OpenAPI服务引用”选项向Visual Studio 2019中的项目添加OpenAPI服务引用时。
我认为应该像使用“ ClassName”一样。
<ItemGroup>
<OpenApiReference Include="OpenAPIs\swagger.json" CodeGenerator="NSwagCSharp" Namespace="PetStore.Client">
<SourceUri>https://petstore.swagger.io/v2/swagger.json</SourceUri>
<ClassName>PetStoreClient</ClassName>
<OutputPath>PetStoreClient.cs</OutputPath>
<Options>/GenerateClientInterfaces:true /ClientBaseClass:ClientBase</Options>
</OpenApiReference>
</ItemGroup>