|
6 | 6 | <_ApiDescriptionTasksAssemblyPath>$(MSBuildThisFileDirectory)/../tasks/$(_ApiDescriptionTasksAssemblyTarget)/Microsoft.Extensions.ApiDescription.Client.dll</_ApiDescriptionTasksAssemblyPath>
|
7 | 7 | <_ApiDescriptionTasksAssemblyTarget />
|
8 | 8 | </PropertyGroup>
|
| 9 | + <UsingTask TaskName="GetCurrentItems" AssemblyFile="$(_ApiDescriptionTasksAssemblyPath)" /> |
9 | 10 | <UsingTask TaskName="GetFileReferenceMetadata" AssemblyFile="$(_ApiDescriptionTasksAssemblyPath)" />
|
10 | 11 | <UsingTask TaskName="GetProjectReferenceMetadata" AssemblyFile="$(_ApiDescriptionTasksAssemblyPath)" />
|
11 | 12 | <UsingTask TaskName="GetUriReferenceMetadata" AssemblyFile="$(_ApiDescriptionTasksAssemblyPath)" />
|
12 | 13 | <UsingTask TaskName="Microsoft.Extensions.ApiDescription.Client.DownloadFile" AssemblyFile="$(_ApiDescriptionTasksAssemblyPath)" />
|
13 | 14 |
|
| 15 | + <!-- Settings users may update as they see fit. --> |
14 | 16 | <PropertyGroup>
|
15 |
| - <ServiceProjectReferenceCheckIfNewer Condition="'$(ServiceProjectReferenceCheckIfNewer)' == ''">true</ServiceProjectReferenceCheckIfNewer> |
| 17 | + <ServiceProjectReferenceCheckIfNewer |
| 18 | + Condition="'$(ServiceProjectReferenceCheckIfNewer)' == ''">true</ServiceProjectReferenceCheckIfNewer> |
16 | 19 | <ServiceProjectReferenceDirectory
|
17 |
| - Condition="'$(ServiceProjectReferenceDirectory)' != ''">$([MSBuild]::EnsureTrailingSlash('$(ServiceProjectReferenceDirectory)'))</ServiceProjectReferenceDirectory> |
| 20 | + Condition="'$(ServiceProjectReferenceDirectory)' != ''">$([MSBuild]::EnsureTrailingSlash('$(ServiceProjectReferenceDirectory)'))</ServiceProjectReferenceDirectory> |
18 | 21 |
|
19 |
| - <ServiceUriReferenceCheckIfNewer Condition="'$(ServiceUriReferenceCheckIfNewer)' == ''">true</ServiceUriReferenceCheckIfNewer> |
| 22 | + <ServiceUriReferenceCheckIfNewer |
| 23 | + Condition="'$(ServiceUriReferenceCheckIfNewer)' == ''">true</ServiceUriReferenceCheckIfNewer> |
20 | 24 | <ServiceUriReferenceDirectory
|
21 |
| - Condition="'$(ServiceUriReferenceDirectory)' != ''">$([MSBuild]::EnsureTrailingSlash('$(ServiceUriReferenceDirectory)'))</ServiceUriReferenceDirectory> |
| 25 | + Condition="'$(ServiceUriReferenceDirectory)' != ''">$([MSBuild]::EnsureTrailingSlash('$(ServiceUriReferenceDirectory)'))</ServiceUriReferenceDirectory> |
22 | 26 |
|
23 |
| - <ServiceFileReferenceCheckIfNewer Condition="'$(ServiceFileReferenceCheckIfNewer)' == ''">true</ServiceFileReferenceCheckIfNewer> |
| 27 | + <ServiceFileReferenceCheckIfNewer |
| 28 | + Condition="'$(ServiceFileReferenceCheckIfNewer)' == ''">true</ServiceFileReferenceCheckIfNewer> |
24 | 29 | <ServiceFileReferenceDirectory
|
25 |
| - Condition="'$(ServiceFileReferenceDirectory)' != ''">$([MSBuild]::EnsureTrailingSlash('$(ServiceFileReferenceDirectory)'))</ServiceFileReferenceDirectory> |
26 |
| - <ServiceFileReferenceCSharpNamespace Condition="'$(ServiceFileReferenceCSharpNamespace)' == ''">$(RootNamespace)</ServiceFileReferenceCSharpNamespace> |
27 |
| - <ServiceFileReferenceTypeScriptNamespace Condition="'$(ServiceFileReferenceTypeScriptNamespace)' == ''">$(RootNamespace)</ServiceFileReferenceTypeScriptNamespace> |
28 |
| - |
29 |
| - <DefaultDocumentGeneratorDependsOn> |
30 |
| - _DefaultDocumentGenerator_GetMetadata; |
31 |
| - _DefaultDocumentGenerator_Core; |
32 |
| - _DefaultDocumentGenerator_SetMetadata |
33 |
| - </DefaultDocumentGeneratorDependsOn> |
34 |
| - <ServiceProjectReferenceGeneratorDependsOn> |
35 |
| - _ServiceProjectReferenceGenerator_GetTargetFramework; |
36 |
| - _ServiceProjectReferenceGenerator_GetProjectTargetPath; |
37 |
| - _ServiceProjectReferenceGenerator_Restore; |
38 |
| - _ServiceProjectReferenceGenerator_Build; |
39 |
| - _ServiceProjectReferenceGenerator_Core |
40 |
| - </ServiceProjectReferenceGeneratorDependsOn> |
41 |
| - <ServiceUriReferenceGeneratorDependsOn> |
42 |
| - _ServiceUriReferenceGenerator_GetMetadata; |
43 |
| - _ServiceUriReferenceGenerator_Core |
44 |
| - </ServiceUriReferenceGeneratorDependsOn> |
45 |
| - <ServiceFileReferenceGeneratorDependsOn> |
46 |
| - _CheckServiceReferences; |
47 |
| - ServiceProjectReferenceGenerator; |
48 |
| - ServiceUriReferenceGenerator; |
49 |
| - _ServiceFileReferenceGenerator_GetMetadata; |
50 |
| - _ServiceFileReferenceGenerator_Core |
51 |
| - </ServiceFileReferenceGeneratorDependsOn> |
| 30 | + Condition="'$(ServiceFileReferenceDirectory)' != ''">$([MSBuild]::EnsureTrailingSlash('$(ServiceFileReferenceDirectory)'))</ServiceFileReferenceDirectory> |
| 31 | + <ServiceFileReferenceCSharpNamespace |
| 32 | + Condition="'$(ServiceFileReferenceCSharpNamespace)' == ''">$(RootNamespace)</ServiceFileReferenceCSharpNamespace> |
| 33 | + <ServiceFileReferenceTypeScriptNamespace |
| 34 | + Condition="'$(ServiceFileReferenceTypeScriptNamespace)' == ''">$(RootNamespace)</ServiceFileReferenceTypeScriptNamespace> |
52 | 35 | </PropertyGroup>
|
53 | 36 |
|
54 | 37 | <!--
|
|
59 | 42 | <ServiceProjectReference>
|
60 | 43 | <!-- Name of the API description document generator. -->
|
61 | 44 | <DocumentGenerator>Default</DocumentGenerator>
|
| 45 | + |
| 46 | + <!-- Server project metadata which is likely applicable to all document generators. --> |
| 47 | + |
| 48 | + <!-- |
| 49 | + Full path of the project's generated assembly. Corresponds to $(TargetPath). Because common code builds server |
| 50 | + projects, file exists prior to document generator invocation. |
| 51 | + --> |
| 52 | + <ProjectAssemblyPath /> |
| 53 | + <!-- Server project's chosen configuration. Likely matches client project's configuration. --> |
| 54 | + <ProjectConfiguration /> |
| 55 | + <!-- |
| 56 | + Server project's extensions path. Corresponds to $(MSBuildProjectExtensionsPath). User must set this if |
| 57 | + server project's value is not 'obj/'. |
| 58 | + --> |
| 59 | + <ProjectExtensionsPath /> |
| 60 | + <!-- Runtime identifier to use when building the server project. --> |
| 61 | + <ProjectRuntimeIdentifier /> |
| 62 | + <!-- Server project's target framework. Defaults to $(TargetFramewok) or first of $(TargetFrameworks). --> |
| 63 | + <ProjectTargetFramework /> |
| 64 | + |
| 65 | + <!-- Metadata specific to the Default document generator (though other document generators are free to use it). --> |
| 66 | + |
| 67 | + <!-- |
| 68 | + Options added to Default document generator tool's command line. Defaults to |
| 69 | + $(DefaultDocumentGeneratorDefaultOptions) if that is set in the client project. |
| 70 | + --> |
| 71 | + <DefaultDocumentGeneratorOptions /> |
62 | 72 | <!--
|
63 | 73 | Name of the document to generate. Passed to the %(Method) when using Default document generator. Default is set
|
64 | 74 | in server project, falling back to "v1".
|
|
84 | 94 | the %(Service) fails. Default is set in server project and metadata has no further fallback.
|
85 | 95 | -->
|
86 | 96 | <Uri />
|
87 |
| - |
88 |
| - <!-- |
89 |
| - Full path of the project's generated assembly. Corresponds to $(TargetPath). Because common code builds server |
90 |
| - projects, file exists prior to document generator invocation. |
91 |
| - --> |
92 |
| - <ProjectAssemblyPath /> |
93 |
| - <!-- Server project's chosen configuration. Likely matches client project's configuration. --> |
94 |
| - <ProjectConfiguration /> |
95 |
| - <!-- |
96 |
| - Server project's extensions path. Corresponds to $(MSBuildProjectExtensionsPath). Must set this if project's |
97 |
| - value is not 'obj/'. |
98 |
| - --> |
99 |
| - <ProjectExtensionsPath /> |
100 |
| - <!-- Runtime identifier to use when building the server project. --> |
101 |
| - <ProjectRuntimeIdentifier /> |
102 |
| - <!-- Server project's target framework. Defaults to $(TargetFramewok) or first of $(TargetFrameworks). --> |
103 |
| - <ProjectTargetFramework /> |
104 | 97 | </ServiceProjectReference>
|
105 | 98 |
|
106 | 99 | <ServiceUriReference>
|
107 | 100 | <!--
|
108 | 101 | Full path where the API description document is placed. Default filename is based on %(Identity).
|
109 |
| - Filenames and relative paths (if explicitly set) are combined with $(ServiceProjectReferenceDirectory). |
| 102 | + Filenames and relative paths (if explicitly set) are combined with $(ServiceUriReferenceDirectory). |
110 | 103 | -->
|
111 | 104 | <DocumentPath />
|
112 | 105 | </ServiceUriReference>
|
113 | 106 |
|
114 | 107 | <ServiceFileReference>
|
115 |
| - <!-- Name of the class to generate. --> |
116 |
| - <ClassName>%(Filename)Client</ClassName> |
| 108 | + <!-- Name of the class to generate. Defaults to %(Filename)Client but with an uppercase first letter. --> |
| 109 | + <ClassName /> |
117 | 110 | <!-- Code generator to use. Required. -->
|
118 | 111 | <CodeGenerator />
|
119 | 112 | <!--
|
|
124 | 117 | <!--
|
125 | 118 | Path to place generated code. Code generator may interpret path as a filename or directory. Default filename or
|
126 | 119 | folder name is %(ClassName).[cs|ts]. Filenames and relative paths (if explicitly set) are combined with
|
127 |
| - $(ServiceProjectReferenceDirectory). |
| 120 | + $(ServiceFileReferenceDirectory). |
128 | 121 | -->
|
129 | 122 | <OutputPath />
|
130 | 123 | </ServiceFileReference>
|
|
0 commit comments