Skip to content

Commit

Permalink
Merge pull request #3456 from RicoSuter/master
Browse files Browse the repository at this point in the history
Release v13.11.0
  • Loading branch information
RicoSuter authored May 7, 2021
2 parents 5162566 + 06eea6d commit b9d3f7f
Show file tree
Hide file tree
Showing 179 changed files with 1,008 additions and 10,053 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@ src/packages/**
/src/NSwag.Console/Properties/launchSettings.json

# Ignore files from JetBrainds Rider
/src/.idea/
/src/.idea/
_ReSharper.Caches/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ The NuGet packages may require the **Microsoft.NETCore.Portable.Compatibility**

### Usage in C#

To register the [middlewares](https://github.com/RicoSuter/NSwag/wiki/AspNetCoreOpenApiDocumentGenerator) to generate a OpenAPI spec and render the UI, register NSwag in `Startup.cs`:
To register the [middlewares](https://github.com/RicoSuter/NSwag/wiki/AspNetCore-Middleware) to generate a OpenAPI spec and render the UI, register NSwag in `Startup.cs`:

```csharp
public class Startup
Expand Down
54 changes: 29 additions & 25 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pool:

variables:
BuildConfiguration: Release
Projects: 'src/NSwag.Min.sln'
Projects: 'src/NSwag.sln'

steps:
# Install required SDKs and tools
Expand All @@ -25,46 +25,41 @@ steps:
- task: CmdLine@2
displayName: 'Install DNT'
inputs:
script: 'npm i -g dotnettools@1.2.5'
script: 'npm i -g dotnettools'

# Patch project versions (on master only)
# - task: CmdLine@2
# displayName: 'Update project version patch'
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# inputs:
# script: 'dnt bump-versions patch'
# failOnStderr: true
- task: CmdLine@2
displayName: 'Patch project version preview'
displayName: 'Patch project version (preview)'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/release'))
inputs:
script: 'dnt bump-versions preview "$(Build.BuildNumber)"'
failOnStderr: true

- task: DotNetCoreCLI@2
displayName: 'Restoring code using dotnet restore'
displayName: 'Restore packages'
inputs:
command: 'restore'
projects: '$(Projects)'
includeNuGetOrg: true

# Build and test
- task: DotNetCoreCLI@2
- task: MSBuild@1
displayName: 'Build solution'
inputs:
command: 'build'
projects: '$(Projects)'
arguments: '--configuration $(BuildConfiguration)'
feedsToUse: 'select'
versioningScheme: 'off'
# - task: DotNetCoreCLI@2
# displayName: 'Run tests'
# inputs:
# command: 'test'
# projects: '$(Projects)'
# arguments: '--configuration $(BuildConfiguration)'
# feedsToUse: 'select'
# versioningScheme: 'off'
solution: '$(Projects)'
msbuildArchitecture: 'x86'
configuration: '$(BuildConfiguration)'

- task: VSTest@2
displayName: 'Run tests'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*test*.dll
!**\*TestAdapter.dll
!**\*Integration*.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
configuration: '$(BuildConfiguration)'

# Publish artifacts
- task: CopyFiles@2
Expand All @@ -74,6 +69,15 @@ steps:
Contents: '**/*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true

- task: CopyFiles@2
displayName: 'Copy MSI'
# condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
Contents: '**/*.msi'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true

- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
# condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
Expand Down
34 changes: 17 additions & 17 deletions build/03_RunIntegrationTests.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ pushd "%~dp0\..\samples"
cmd /c call powershell .\run.ps1 Release || goto :error
popd

pushd "%~dp0\..\src\NSwag.Sample.NETCore11"
dotnet restore || goto :error
dotnet publish || goto :error
cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore21 || goto :error
popd
REM pushd "%~dp0\..\src\NSwag.Sample.NETCore11"
REM dotnet restore || goto :error
REM dotnet publish || goto :error
REM cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore21 || goto :error
REM popd

pushd "%~dp0\..\src\NSwag.Sample.NETCore20"
dotnet restore || goto :error
dotnet publish || goto :error
cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore21 || goto :error
popd
REM pushd "%~dp0\..\src\NSwag.Sample.NETCore20"
REM dotnet restore || goto :error
REM dotnet publish || goto :error
REM cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore21 || goto :error
REM popd

pushd "%~dp0\..\src\NSwag.Sample.NETCore21"
dotnet restore || goto :error
dotnet build /p:CopyLocalLockFileAssemblies=true || goto :error
cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore21 || goto :error
popd

pushd "%~dp0\..\src\NSwag.Sample.NETCore22"
dotnet restore || goto :error
dotnet build /p:CopyLocalLockFileAssemblies=true || goto :error
cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore22 || goto :error
popd
REM pushd "%~dp0\..\src\NSwag.Sample.NETCore22"
REM dotnet restore || goto :error
REM dotnet build /p:CopyLocalLockFileAssemblies=true || goto :error
REM cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore22 || goto :error
REM popd

pushd "%~dp0\..\src\NSwag.Sample.NETCore30"
pushd "%~dp0\..\src\NSwag.Sample.NETCore31"
dotnet restore || goto :error
dotnet build /p:CopyLocalLockFileAssemblies=true || goto :error
cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore30 || goto :error
cmd /c call "..\NSwagStudio\bin\Release\nswag.cmd" run /runtime:NetCore31 || goto :error
popd

pushd "%~dp0\..\src\NSwag.Sample.NetGlobalAsax"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<ItemGroup>
<!-- ## NSwag -->
<PackageReference Include="NSwag.AspNetCore" Version="13.10.9" />
<PackageReference Include="NSwag.MSBuild" Version="13.10.9">
<PackageReference Include="NSwag.AspNetCore" Version="13.11.0" />
<PackageReference Include="NSwag.MSBuild" Version="13.11.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@
<Reference Include="NJsonSchema, Version=10.2.1.0, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102, processorArchitecture=MSIL">
<HintPath>..\..\packages\NJsonSchema.10.2.1\lib\net45\NJsonSchema.dll</HintPath>
</Reference>
<Reference Include="NSwag.AspNet.Owin, Version=13.10.9.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSwag.AspNet.Owin.13.10.9\lib\net45\NSwag.AspNet.Owin.dll</HintPath>
<Reference Include="NSwag.AspNet.Owin, Version=13.11.0.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSwag.AspNet.Owin.13.11.0\lib\net45\NSwag.AspNet.Owin.dll</HintPath>
</Reference>
<Reference Include="NSwag.Core, Version=13.10.9.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSwag.Core.13.10.9\lib\net45\NSwag.Core.dll</HintPath>
<Reference Include="NSwag.Core, Version=13.11.0.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSwag.Core.13.11.0\lib\net45\NSwag.Core.dll</HintPath>
</Reference>
<Reference Include="NSwag.Generation, Version=13.10.9.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSwag.Generation.13.10.9\lib\net45\NSwag.Generation.dll</HintPath>
<Reference Include="NSwag.Generation, Version=13.11.0.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSwag.Generation.13.11.0\lib\net45\NSwag.Generation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NSwag.Generation.WebApi, Version=13.10.9.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSwag.Generation.WebApi.13.10.9\lib\net45\NSwag.Generation.WebApi.dll</HintPath>
<Reference Include="NSwag.Generation.WebApi, Version=13.11.0.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSwag.Generation.WebApi.13.11.0\lib\net45\NSwag.Generation.WebApi.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
Expand Down

This file was deleted.

25 changes: 0 additions & 25 deletions samples/WithoutMiddleware/Sample.AspNetCore20/Program.cs

This file was deleted.

This file was deleted.

This file was deleted.

34 changes: 0 additions & 34 deletions samples/WithoutMiddleware/Sample.AspNetCore20/Startup.cs

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions samples/WithoutMiddleware/Sample.AspNetCore20/appsettings.json

This file was deleted.

Loading

0 comments on commit b9d3f7f

Please sign in to comment.