Add Microsoft.Extensions.ApiDesription.Server project and package (#10669)
- #8242 2 of 2, # #4912 - add missing project reference provider - remove incorrect `$(IsImplementationProject)` settings in `dotnet-getdocument` and `GetDocumentInsider` - re-run .\eng\scripts\GenerateProjectList.ps1
This commit is contained in:
parent
78b38a7ba0
commit
b3ddd65a15
|
|
@ -8,7 +8,10 @@
|
|||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Identity.Specification.Tests" ProjectPath="$(RepoRoot)src\Identity\Specification.Tests\src\Microsoft.AspNetCore.Identity.Specification.Tests.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.Web.Xdt.Extensions" ProjectPath="$(RepoRoot)src\SiteExtensions\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.DeveloperCertificates.XPlat" ProjectPath="$(RepoRoot)src\Tools\FirstRunCertGenerator\src\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj" />
|
||||
<ProjectReferenceProvider Include="dotnet-getdocument" ProjectPath="$(RepoRoot)src\Mvc\dotnet-getdocument\src\dotnet-getdocument.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Client" ProjectPath="$(RepoRoot)src\Mvc\Extensions.ApiDescription.Client\src\Microsoft.Extensions.ApiDescription.Client.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Server" ProjectPath="$(RepoRoot)src\Mvc\Extensions.ApiDescription.Server\src\Microsoft.Extensions.ApiDescription.Server.csproj" />
|
||||
<ProjectReferenceProvider Include="GetDocument.Insider" ProjectPath="$(RepoRoot)src\Mvc\GetDocumentInsider\src\GetDocumentInsider.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.Specification.Tests" ProjectPath="$(RepoRoot)src\SignalR\server\Specification.Tests\src\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Build" ProjectPath="$(RepoRoot)src\Components\Blazor\Build\src\Microsoft.AspNetCore.Blazor.Build.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore" ProjectPath="$(RepoRoot)src\DefaultBuilder\src\Microsoft.AspNetCore.csproj" RefProjectPath="$(RepoRoot)src\DefaultBuilder\ref\Microsoft.AspNetCore.csproj" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
<Project>
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Execute PopulateNuspec fairly late. -->
|
||||
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);PopulateNuspec</GenerateNuspecDependsOn>
|
||||
|
||||
<!-- Do not complain about lack of lib folder. -->
|
||||
<NoPackageAnalysis>true</NoPackageAnalysis>
|
||||
|
||||
<!-- Included primarily to ensure dotnet-getdocument and GetDocument.Insider can be referenced. -->
|
||||
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
|
||||
|
||||
<Description>MSBuild tasks and targets for build-time Swagger and OpenApi document generation</Description>
|
||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||
<IncludeSource>false</IncludeSource>
|
||||
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
|
||||
<PackageId>$(MSBuildProjectName)</PackageId>
|
||||
<PackageTags>MSBuild;Swagger;Open API;code generation;Web API</PackageTags>
|
||||
<IsShippingPackage>true</IsShippingPackage>
|
||||
<PackageVersion>$(ExperimentalPackageVersion)</PackageVersion>
|
||||
<VerifyVersion>false</VerifyVersion>
|
||||
<VersionPrefix>$(ExperimentalVersionPrefix)</VersionPrefix>
|
||||
<VersionSuffix>$(ExperimentalVersionSuffix)</VersionSuffix>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="dotnet-getdocument" Condition=" '$(TargetFramework)' == 'netcoreapp2.1' " />
|
||||
<Reference Include="GetDocument.Insider" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PopulateNuspec">
|
||||
<MSBuild Projects="../../dotnet-getdocument/src/dotnet-getdocument.csproj"
|
||||
BuildInParallel="$(BuildInParallel)"
|
||||
RemoveProperties="RuntimeIdentifier;TargetFrameworks;TargetFramework"
|
||||
Targets="Publish" />
|
||||
|
||||
<PropertyGroup>
|
||||
<NuspecProperties>
|
||||
id=$(PackageId);
|
||||
artifactsBinDir=$(ArtifactsBinDir);
|
||||
authors=$(Authors);
|
||||
configuration=$(Configuration);
|
||||
copyright=$(Copyright);
|
||||
description=$(PackageDescription);
|
||||
iconUrl=$(PackageIconUrl);
|
||||
licenseUrl=$(PackageLicenseUrl);
|
||||
owners=$(Company);
|
||||
projectUrl=$(PackageProjectUrl);
|
||||
repositoryCommit=$(SourceRevisionId);
|
||||
repositoryUrl=$(RepositoryUrl);
|
||||
tags=$(PackageTags.Replace(';', ' '));
|
||||
version=$(PackageVersion);
|
||||
</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<Target Name="Compile" />
|
||||
<Target Name="CopyFilesToOutputDirectory" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.8">
|
||||
<id>$id$</id>
|
||||
<authors>$authors$</authors>
|
||||
<copyright>$copyright$</copyright>
|
||||
<description>$description$</description>
|
||||
<developmentDependency>true</developmentDependency>
|
||||
<iconUrl>$iconUrl$</iconUrl>
|
||||
<licenseUrl>$licenseUrl$</licenseUrl>
|
||||
<owners>$owners$</owners>
|
||||
<projectUrl>$projectUrl$</projectUrl>
|
||||
<repository type="git" url="$repositoryUrl$" commit="$repositoryCommit$" />
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<tags>$tags$</tags>
|
||||
<version>$version$</version>
|
||||
</metadata>
|
||||
|
||||
<files>
|
||||
<file src="build\*" target="build" />
|
||||
<file src="buildMultiTargeting\*" target="buildMultiTargeting" />
|
||||
<file src="$artifactsBinDir$\dotnet-getdocument\$configuration$\netcoreapp2.1\publish\*.*" target="tools" />
|
||||
<file src="$artifactsBinDir$\GetDocumentInsider\$configuration$\net461\GetDocument.Insider.*" target="tools\net461" />
|
||||
<file src="$artifactsBinDir$\GetDocumentInsider\x86\$configuration$\net461\GetDocument.Insider.*" target="tools\net461-x86" />
|
||||
<file src="$artifactsBinDir$\GetDocumentInsider\$configuration$\netcoreapp2.1\GetDocument.Insider.*" target="tools\netcoreapp2.1" />
|
||||
</files>
|
||||
</package>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project>
|
||||
<!--
|
||||
Settings users may update as they see fit.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
Options added to the Open API document generation tool ('dotnet-getdocument') command line. Available options
|
||||
control console output: 'no-color', 'prefix-output' and 'verbose'. All require a double-dash prefix.
|
||||
-->
|
||||
<OpenApiGenerateDocumentsOptions Condition=" '$(OpenApiGenerateDocumentsOptions)' == '' "></OpenApiGenerateDocumentsOptions>
|
||||
|
||||
<!--
|
||||
If 'true' (the default), enable generation of Open API documents. Otherwise, this feature is completely disabled.
|
||||
This controls whether the 'OpenApiGenerateDocuments' project capability is visible, enables / disables the
|
||||
'GenerateOpenApiDocuments' target and provides the $(OpenApiGenerateDocumentsOnBuild) default.
|
||||
-->
|
||||
<OpenApiGenerateDocuments Condition=" '$(OpenApiGenerateDocuments)' == '' ">true</OpenApiGenerateDocuments>
|
||||
|
||||
<!--
|
||||
If 'true' (the default if $(OpenApiGenerateDocuments) is 'true'), will generate Open API documents after every
|
||||
build. Set to 'false' when targets are invoked from the command line or tied to another target.
|
||||
-->
|
||||
<OpenApiGenerateDocumentsOnBuild
|
||||
Condition=" '$(OpenApiGenerateDocumentsOnBuild)' == '' ">$(OpenApiGenerateDocuments)</OpenApiGenerateDocumentsOnBuild>
|
||||
|
||||
<!--
|
||||
Where to place Open API documents generated from the application. Value is interpreted relative to the project
|
||||
folder, unless already an absolute path.
|
||||
-->
|
||||
<OpenApiDocumentsDirectory
|
||||
Condition=" '$(OpenApiDocumentsDirectory)' == '' ">$(BaseIntermediateOutputPath)</OpenApiDocumentsDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<_OpenApiDocumentsCache>$(BaseIntermediateOutputPath)$(MSBuildProjectName).OpenApiFiles.cache</_OpenApiDocumentsCache>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(OpenApiGenerateDocuments)' == 'true' ">
|
||||
<ProjectCapability Include="OpenApiGenerateDocuments" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="OpenApiGetDocuments" Returns="@(_OpenApiProjectDocuments)">
|
||||
<ReadLinesFromFile File="$(_OpenApiDocumentsCache)">
|
||||
<Output TaskParameter="Lines" ItemName="_OpenApiProjectDocuments" />
|
||||
</ReadLinesFromFile>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateOpenApiDocuments" Condition=" '$(OpenApiGenerateDocuments)' == 'true' ">
|
||||
<PropertyGroup>
|
||||
<_Command>dotnet "$(MSBuildThisFileDirectory)/../tools/dotnet-getdocument.dll" --assembly "$(TargetPath)"</_Command>
|
||||
<_Command>$(_Command) --file-list "$(_OpenApiDocumentsCache)" --framework "$(TargetFrameworkMoniker)"</_Command>
|
||||
<_Command>$(_Command) --output "$(OpenApiDocumentsDirectory.TrimEnd('\'))" --project "$(MSBuildProjectName)"</_Command>
|
||||
<_Command Condition=" '$(ProjectAssetsFile)' != '' ">$(_Command) --assets-file "$(ProjectAssetsFile)"</_Command>
|
||||
<_Command Condition=" '$(PlatformTarget)' != '' ">$(_Command) --platform "$(PlatformTarget)"</_Command>
|
||||
<_Command Condition=" '$(PlatformTarget)' == '' AND '$(Platform)' != '' ">$(_Command) --platform "$(Platform)"</_Command>
|
||||
<_Command Condition=" '$(RuntimeIdentifier)' != '' ">$(_Command) --runtime "$(RuntimeIdentifier)"</_Command>
|
||||
<_Command>$(_Command) $(OpenApiGenerateDocumentsOptions)</_Command>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Importance="high" Text="%0AGenerateOpenApiDocuments:" />
|
||||
<Message Importance="high" Text=" $(_Command)" />
|
||||
<Exec Command="$(_Command)" />
|
||||
</Target>
|
||||
|
||||
<!-- Unless this is an inner build or default timing is disabled, tie document retrieval into the build. -->
|
||||
|
||||
<Target Name="_GenerateOpenApiDocuments"
|
||||
AfterTargets="Build"
|
||||
Condition=" '$(OpenApiGenerateDocumentsOnBuild)' == 'true' AND ('$(TargetFramework)' == '' OR '$(TargetFrameworks)' == '') "
|
||||
DependsOnTargets="GenerateOpenApiDocuments" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project>
|
||||
<Import Project="../build/Microsoft.Extensions.ApiDescription.Server.props" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project>
|
||||
<ItemGroup Condition=" '$(OpenApiGenerateDocuments)' == 'true' ">
|
||||
<ProjectCapability Include="OpenApiGenerateDocuments" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="GenerateOpenApiDocuments">
|
||||
<MSBuild Projects="$(MSBuildProjectFile)"
|
||||
Targets="GenerateOpenApiDocuments"
|
||||
Properties="TargetFramework=$(TargetFrameworks.Split(';')[0])"
|
||||
RemoveProperties="RuntimeIdentifier" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_GenerateOpenApiDocuments"
|
||||
AfterTargets="Build"
|
||||
Condition=" '$(OpenApiGenerateDocumentsOnBuild)' == 'true' "
|
||||
DependsOnTargets="GenerateOpenApiDocuments" />
|
||||
|
||||
<Target Name="OpenApiGetDocuments" Returns="@(_OpenApiProjectDocuments)">
|
||||
<MSBuild Projects="$(MSBuildProjectFile)"
|
||||
Targets="OpenApiGetDocuments"
|
||||
Properties="TargetFramework=$(TargetFrameworks.Split(';')[0])"
|
||||
RemoveProperties="RuntimeIdentifier">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_OpenApiProjectDocuments" />
|
||||
</MSBuild>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
<PropertyGroup>
|
||||
<AssemblyName>GetDocument.Insider</AssemblyName>
|
||||
<Description>GetDocument Command-line Tool inside man</Description>
|
||||
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||
<IsPackable>false</IsPackable>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Microsoft.Extensions.ApiDescription.Tool</RootNamespace>
|
||||
|
|
@ -9,7 +10,6 @@
|
|||
<VerifyVersion>false</VerifyVersion>
|
||||
<VersionPrefix>$(ExperimentalVersionPrefix)</VersionPrefix>
|
||||
<VersionSuffix>$(ExperimentalVersionSuffix)</VersionSuffix>
|
||||
<IsImplementationProject>false</IsImplementationProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
|
||||
|
|
|
|||
|
|
@ -321,6 +321,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Co
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SignalR.Protocols.Json", "..\SignalR\common\Protocols.Json\src\Microsoft.AspNetCore.SignalR.Protocols.Json.csproj", "{637119E8-5BBB-4FC7-A372-DAF38FF5EBD9}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions.ApiDescription.Server", "Extensions.ApiDescription.Server", "{C15AA245-9E54-4FD6-90FF-B46F47779C46}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ApiDescription.Server", "Extensions.ApiDescription.Server\src\Microsoft.Extensions.ApiDescription.Server.csproj", "{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -1825,6 +1829,18 @@ Global
|
|||
{637119E8-5BBB-4FC7-A372-DAF38FF5EBD9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{637119E8-5BBB-4FC7-A372-DAF38FF5EBD9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{637119E8-5BBB-4FC7-A372-DAF38FF5EBD9}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -1955,6 +1971,7 @@ Global
|
|||
{6D6489E5-48BD-4F9B-9EEE-22AEEA1E1890} = {45CE788D-4B69-4F83-981C-F43D8F15B0F1}
|
||||
{C6F3BCE6-1EFD-4360-932B-B98573E78926} = {45CE788D-4B69-4F83-981C-F43D8F15B0F1}
|
||||
{637119E8-5BBB-4FC7-A372-DAF38FF5EBD9} = {5FE3048A-E96B-44F8-A7C4-FC590D7E04B4}
|
||||
{D7CF2A1E-A29E-45AB-9C2A-CD6C3BAE54F2} = {C15AA245-9E54-4FD6-90FF-B46F47779C46}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {63D344F6-F86D-40E6-85B9-0AABBE338C4A}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<PropertyGroup>
|
||||
<AssemblyName>dotnet-getdocument</AssemblyName>
|
||||
<Description>GetDocument Command-line Tool outside man</Description>
|
||||
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||
<IsPackable>false</IsPackable>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Microsoft.Extensions.ApiDescription.Tool</RootNamespace>
|
||||
|
|
@ -10,7 +11,6 @@
|
|||
<VerifyVersion>false</VerifyVersion>
|
||||
<VersionPrefix>$(ExperimentalVersionPrefix)</VersionPrefix>
|
||||
<VersionSuffix>$(ExperimentalVersionSuffix)</VersionSuffix>
|
||||
<IsImplementationProject>false</IsImplementationProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue