-
Notifications
You must be signed in to change notification settings - Fork 10k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more properties controlling service reference code generation (#1…
…0641) - `$(OpenApiGenerateCodeOnBuild)` controls if targets run before compile targets - #4924 - also correct multiple invocations when project has multiple target frameworks - `$(OpenApiBuildReferencedProjects)` controls whether `@(OpenApiProjectReference)` items build automatically - #6582 - rename a few other properties and targets also: - add symbols for Microsoft.Extensions.ApiDescription.Client task assembly - #10508 - unconditionally run `OpenApiGetDocuments` target in referenced projects - corrects compilation in design-time builds - no longer uses `@(ProjectReferenceWithConfiguration)`; referenced project chooses all property values nits: - consolidate into a single `$(GenerateOpenApiCodeDependsOn)` property - rename task assembly and namespaces in Microsoft.Extensions.ApiDesription.Client to match the project - allow `OpenApiGetDocuments` targets to run in parallel if `$(BuildInParallel)` is enabled - remove `$(OpenApiCodeDirectory)` normalization; never concatenated with anything else
- Loading branch information
Showing
12 changed files
with
103 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Mvc/Extensions.ApiDescription.Client/src/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...scription.Client/src/buildMultiTargeting/Microsoft.Extensions.ApiDescription.Client.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<Project> | ||
<Import Project="../build/Microsoft.Extensions.ApiDescription.Client.props" /> | ||
</Project> |
13 changes: 9 additions & 4 deletions
13
...ription.Client/src/buildMultiTargeting/Microsoft.Extensions.ApiDescription.Client.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<Project> | ||
<Target Name="GenerateServiceFileReferenceCode" BeforeTargets="BeforeCompile"> | ||
<MsBuild Projects="$(MSBuildProjectFile)" | ||
Targets="GenerateServiceFileReferenceCode" | ||
<Target Name="GenerateOpenApiCode"> | ||
<MSBuild Projects="$(MSBuildProjectFile)" | ||
Targets="GenerateOpenApiCode" | ||
Properties="TargetFramework=$(TargetFrameworks.Split(';')[0])" | ||
RemoveProperties="TargetFrameworks;RuntimeIdentifier" /> | ||
RemoveProperties="RuntimeIdentifier" /> | ||
</Target> | ||
|
||
<Target Name="_GenerateOpenApiCode" | ||
BeforeTargets="BeforeCompile" | ||
Condition=" ''$(OpenApiGenerateCodeOnBuild)' == 'true' " | ||
DependsOnTargets="GenerateOpenApiCode" /> | ||
</Project> |