aspnetcore/src/Mvc/Extensions.ApiDescription.C.../src/build/Microsoft.Extensions.ApiDes...

135 lines
6.3 KiB
XML

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project>
<PropertyGroup>
<_ApiDescriptionClientAssemblyTarget
Condition="'$(MSBuildRuntimeType)' == 'Core'">netstandard2.0</_ApiDescriptionClientAssemblyTarget>
<_ApiDescriptionClientAssemblyTarget
Condition="'$(MSBuildRuntimeType)' != 'Core'">net461</_ApiDescriptionClientAssemblyTarget>
<_ApiDescriptionClientAssemblyPath>$(MSBuildThisFileDirectory)/../tasks/$(_ApiDescriptionClientAssemblyTarget)/Microsoft.Extensions.ApiDescription.Client.dll</_ApiDescriptionClientAssemblyPath>
<_ApiDescriptionClientAssemblyTarget />
</PropertyGroup>
<UsingTask TaskName="GetCurrentItems" AssemblyFile="$(_ApiDescriptionClientAssemblyPath)" />
<UsingTask TaskName="GetFileReferenceMetadata" AssemblyFile="$(_ApiDescriptionClientAssemblyPath)" />
<!--
Settings users may update as they see fit.
-->
<PropertyGroup>
<!--
Options added to the code generator command line by default. Provides the default %(Options) metadata of
@(OpenApiReference) and @(OpenApiProjectReference) items.
-->
<OpenApiGenerateCodeOptions Condition="'$(OpenApiGenerateCodeOptions)' == ''"></OpenApiGenerateCodeOptions>
<!--
If 'true' (the default), generate code for @(OpenApiReference) and @(OpenApiProjectReference) items before the
BeforeCompile target.
If 'false', the 'GenerateOpenApiCode' target is not part of the build (by default) but can run when explicitly
referenced. That is, the target may be invoked from the command line or tied in through another target.
-->
<OpenApiGenerateCodeOnBuild Condition="'$(OpenApiGenerateCodeOnBuild)' == ''">true</OpenApiGenerateCodeOnBuild>
<!--
If 'true' (the default), generate code for @(OpenApiReference) and @(OpenApiProjectReference) items during
design-time builds. Otherwise, generate code only during a full build.
-->
<OpenApiGenerateCodeAtDesignTime
Condition="'$(OpenApiGenerateCodeAtDesignTime)' == ''">true</OpenApiGenerateCodeAtDesignTime>
<!--
If 'true' (the default), build projects referenced in @(OpenApiProjectReference) items before retrieving that
project's OpenAPI documents list (or generating code). If 'false', ensure the referenced projects build before
this one in the solution or through other means. IDEs may be confused about the project dependency graph in this
case.
-->
<OpenApiBuildReferencedProjects
Condition="'$(OpenApiBuildReferencedProjects)' == ''">true</OpenApiBuildReferencedProjects>
<!--
Default folder to place code generated from OpenAPI documents. Value is interpreted relative to the project
folder, unless already an absolute path. Part of the default %(OutputPath) metadata of @(OpenApiReference) and
@(OpenApiProjectReference) items.
-->
<OpenApiCodeDirectory
Condition="'$(OpenApiCodeDirectory)' == ''">$(BaseIntermediateOutputPath)</OpenApiCodeDirectory>
</PropertyGroup>
<!--
Well-known metadata of the code generator item groups.
-->
<ItemGroup>
<AvailableItemName Include="OpenApiReference" />
<AvailableItemName Include="OpenApiProjectReference" />
</ItemGroup>
<!--
Well-known metadata of the code generator item groups.
-->
<ItemDefinitionGroup>
<OpenApiReference>
<!-- Name of the class to generate. Defaults to match filename in %(OutputPath). -->
<ClassName />
<!--
Code generator to use. Required and must end with "CSharp" or "TypeScript" (the currently-supported target
languages) unless %(OutputPath) is set. Builds will invoke a target named "Generate%(CodeGenerator)" to do
actual code generation.
-->
<CodeGenerator>NSwagCSharp</CodeGenerator>
<!-- Namespace to contain generated class. Default is $(RootNamespace). -->
<Namespace />
<!--
Options to pass to the code generator target then (likely) added to a tool's command line. Value is passed
along to the code generator but otherwise unused in this package.
-->
<Options>$(OpenApiGenerateCodeOptions)</Options>
<!--
Path to place generated code. Code generator may interpret path as a filename or directory. Default filename or
folder name is %(Filename)Client.[cs|ts]. Filenames and relative paths (if explicitly set) are combined with
$(OpenApiCodeDirectory). Final value (depending on $(OpenApiCodeDirectory)) is likely to be a path relative to
the client project.
-->
<OutputPath />
</OpenApiReference>
<!-- OpenApiProjectReference items may include all OpenApiReference metadata. -->
<OpenApiProjectReference>
<!--
Name of the class to generate. Defaults to match filename in %(OutputPath). To avoid compilation errors,
override only if the referenced project has a single registered document.
-->
<ClassName />
<!--
Code generator to use. Required and must end with "CSharp" or "TypeScript" (the currently-supported target
languages) unless %(OutputPath) is set. Builds will invoke a target named "Generate%(CodeGenerator)" to do
actual code generation.
-->
<CodeGenerator>NSwagCSharp</CodeGenerator>
<!-- Namespace to contain generated class. Default is $(RootNamespace). -->
<Namespace />
<!--
Options to pass to the code generator target then (likely) added to a tool's command line. Value is passed
along to the code generator but otherwise unused in this package.
-->
<Options>$(OpenApiGenerateCodeOptions)</Options>
<!--
Path to place generated code. Code generator may interpret path as a filename or directory. Default filename or
folder name is {document filename}Client.[cs|ts]. {document filename} is always either %(Filename}.json (when
the document name is "v1") or %(Filename)_{document name}.json (otherwise). Filenames and relative paths (if
explicitly set) are combined with $(OpenApiCodeDirectory). Final value (depending on $(OpenApiCodeDirectory))
is likely to be a path relative to the client project. To avoid repeatedly writing to the same file, override
only if the referenced project has a single registered document.
-->
<OutputPath />
</OpenApiProjectReference>
</ItemDefinitionGroup>
</Project>