Workleap.OpenApi.MSBuild 1.0.0

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Workleap.OpenApi.MSBuild --version 1.0.0
                    
NuGet\Install-Package Workleap.OpenApi.MSBuild -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Workleap.OpenApi.MSBuild" Version="1.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Workleap.OpenApi.MSBuild" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Workleap.OpenApi.MSBuild">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Workleap.OpenApi.MSBuild --version 1.0.0
                    
#r "nuget: Workleap.OpenApi.MSBuild, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Workleap.OpenApi.MSBuild@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Workleap.OpenApi.MSBuild&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Workleap.OpenApi.MSBuild&version=1.0.0
                    
Install as a Cake Tool

Workleap.OpenApi.MSBuild

Validates at build time that the OpenAPI specification files extracted from the ASP.NET Core Web API being built conform to Workleap API guidelines.

Depending if the user chose the ValidateContract or GenerateContract development mode this MSBuild task will:

How it works

Official Documentation

For the TLDR version:

  • The entry point is ValidateOpenApiTask.ExecuteAsync() and will be executed after the referencing project is built. This is defined in ./src/Workleap.OpenApi.MSBuild/msbuild/tools/Workleap.OpenApi.MSBuild.targets as a UsingTask.TaskName
  • The default value are defined in the property group on the target ValidateOpenApi in this file ./src/Workleap.OpenApi.MSBuild/msbuild/tools/Workleap.OpenApi.MSBuild.targets
  • Users can select whether to validate the API with frontend or backend ruleset depending on how they configure the OpenApiServiceProfile MSBuild property (backend (default) or frontend).

Which Swashbuckle.AspNetCore.Cli version is used?

The MSBuild task uses Swashbuckle.AspNetCore.Cli to generate OpenAPI specifications. The version is resolved in the following order (highest to lowest priority):

  1. Explicit configuration - Set via the OpenApiSwaggerVersion MSBuild property:
   <PropertyGroup>
     <OpenApiSwaggerVersion>10.3.0</OpenApiSwaggerVersion>
   </PropertyGroup>
  1. Project dependency - If your project references Swashbuckle.AspNetCore (via *.csproj or Directory.Packages.props), the same version is used.
  2. Default version - Falls back to version 10.1.0 if no version is found.

How to test locally

How debug the project

Since it's a MSBuild task named ValidateOpenApi you can run it this command: msbuild /t:ValidateOpenApi. ./src/WebApiDebugger already have some preconfigured in launchSettings.json that you can run in debug.

Note: Before executing this task it will build the project.

Warming: validate your IDE is in Configuration:Debug otherwise the execution will not be done on the most recent code.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1-preview.1 42 1/16/2026
1.0.0 6,574 1/6/2026
0.12.4-preview.6 43 1/6/2026
0.12.4-preview.5 41 12/31/2025
0.12.4-preview.4 44 12/31/2025
0.12.4-preview.3 196 11/22/2025
0.12.4-preview.2 354 11/18/2025
0.12.4-preview.1 225 11/14/2025
0.12.3 23,087 10/23/2025
0.12.3-preview.78 139 10/23/2025
0.12.3-preview.77 59 10/18/2025
0.12.3-preview.76 134 10/16/2025
0.12.3-preview.75 135 10/16/2025
0.12.3-preview.74 140 10/13/2025
0.12.3-preview.73 140 10/7/2025
0.12.3-preview.72 138 10/7/2025
0.12.3-preview.71 134 10/3/2025
0.12.3-preview.70 145 10/2/2025
0.12.3-preview.69 136 9/29/2025
0.12.3-preview.68 150 9/23/2025
0.12.3-preview.67 188 9/19/2025
0.12.3-preview.66 259 9/19/2025
0.12.3-preview.65 262 9/17/2025
0.12.3-preview.64 266 9/17/2025
0.12.3-preview.63 269 9/17/2025
0.12.3-preview.62 131 9/12/2025
0.12.3-preview.61 157 9/4/2025
0.12.3-preview.60 145 9/4/2025
0.12.3-preview.59 149 9/2/2025
0.12.3-preview.58 188 8/27/2025
0.12.3-preview.57 161 8/25/2025
0.12.3-preview.56 101 8/22/2025
0.12.3-preview.55 143 8/20/2025
0.12.3-preview.54 130 8/15/2025
0.12.3-preview.53 149 8/13/2025
0.12.3-preview.52 139 8/11/2025
0.12.3-preview.51 223 8/7/2025
0.12.3-preview.50 224 8/7/2025
0.12.3-preview.49 212 8/5/2025
0.12.3-preview.48 116 7/29/2025
0.12.3-preview.47 493 7/23/2025
0.12.3-preview.46 535 7/22/2025
0.12.3-preview.45 536 7/22/2025
0.12.3-preview.44 486 7/21/2025
0.12.3-preview.43 321 7/21/2025
0.12.3-preview.42 122 7/18/2025
0.12.3-preview.41 145 7/15/2025
0.12.3-preview.40 67 7/12/2025
0.12.3-preview.39 142 7/10/2025
0.12.3-preview.38 145 7/8/2025
0.12.3-preview.37 80 7/4/2025
0.12.3-preview.36 138 7/4/2025
0.12.3-preview.35 151 7/1/2025
0.12.3-preview.34 144 6/23/2025
0.12.3-preview.33 146 6/18/2025
0.12.3-preview.32 134 6/14/2025
0.12.3-preview.31 251 6/13/2025
0.12.3-preview.30 276 6/10/2025
0.12.3-preview.29 148 6/3/2025
0.12.3-preview.28 73 5/31/2025
0.12.3-preview.27 156 5/27/2025
0.12.3-preview.26 101 5/25/2025
0.12.3-preview.25 90 5/23/2025
0.12.3-preview.24 146 5/22/2025
0.12.3-preview.23 155 5/20/2025
0.12.3-preview.22 141 5/17/2025
0.12.3-preview.21 248 5/13/2025
0.12.3-preview.20 149 5/8/2025
0.12.3-preview.19 152 5/6/2025
0.12.3-preview.18 150 5/6/2025
0.12.3-preview.17 160 4/29/2025
0.12.3-preview.16 103 4/25/2025
0.12.3-preview.15 169 4/22/2025
0.12.3-preview.14 171 4/21/2025
0.12.3-preview.13 189 4/17/2025
0.12.3-preview.12 173 4/15/2025
0.12.3-preview.11 126 4/11/2025
0.12.3-preview.10 122 4/11/2025
0.12.3-preview.9 143 3/27/2025
0.12.3-preview.8 167 3/23/2025
0.12.3-preview.7 100 3/21/2025
0.12.3-preview.6 115 3/21/2025
0.12.3-preview.5 169 3/20/2025
0.12.3-preview.4 147 3/16/2025
0.12.3-preview.3 88 3/15/2025
0.12.3-preview.2 173 3/10/2025
0.12.3-preview.1 139 3/9/2025
0.12.2 46,220 3/4/2025
0.12.2-preview.2 215 3/4/2025
0.12.2-preview.1 99 3/1/2025
0.12.1 6,858 2/27/2025
0.11.1-preview.7 91 2/26/2025
0.11.1-preview.6 117 2/18/2025
0.11.1-preview.5 112 2/10/2025
0.11.1-preview.4 104 2/3/2025
0.11.1-preview.3 109 2/3/2025
0.11.1-preview.2 88 1/24/2025
0.11.1-preview.1 87 1/17/2025
0.11.0 11,694 1/10/2025
0.10.2-preview.2 77 1/10/2025
0.10.1-preview.2 109 12/18/2024
0.10.1-preview.1 102 12/17/2024
0.10.0 1,224 12/10/2024
0.9.1-preview.27 101 10/30/2024
0.9.1-preview.26 94 10/28/2024
0.9.1-preview.25 101 10/28/2024
0.9.1-preview.24 95 10/28/2024
0.9.1-preview.23 103 10/2/2024
0.9.1-preview.22 100 10/1/2024
0.9.1-preview.21 88 10/1/2024
0.9.1-preview.20 100 10/1/2024
0.9.1-preview.19 91 10/1/2024
0.9.1-preview.18 108 9/30/2024
0.9.1-preview.17 89 8/27/2024
0.9.1-preview.16 89 8/27/2024
0.9.1-preview.15 91 8/27/2024
0.9.1-preview.14 109 8/16/2024
0.9.1-preview.13 109 8/16/2024
0.9.1-preview.12 109 8/16/2024
0.9.1-preview.11 118 8/15/2024
0.9.1-preview.10 107 8/15/2024
0.9.1-preview.9 116 8/14/2024
0.9.1-preview.8 111 8/14/2024
0.9.1-preview.7 84 8/5/2024
0.9.1-preview.6 117 7/18/2024
0.9.1-preview.5 98 7/17/2024
0.9.1-preview.4 98 7/16/2024
0.9.1-preview.3 91 7/5/2024
0.9.1-preview.2 98 6/25/2024
0.9.1-preview.1 105 6/14/2024
0.9.0 18,480 6/12/2024
0.8.2-preview.4 97 6/12/2024
0.8.2-preview.3 95 6/10/2024
0.8.2-preview.2 97 5/31/2024
0.8.2-preview.1 91 5/31/2024
0.8.1 1,677 5/24/2024
0.8.1-preview.1 116 5/24/2024
0.8.0 232 5/21/2024
0.7.1-preview.4 106 5/21/2024
0.7.1-preview.3 101 5/21/2024
0.7.1-preview.2 87 5/21/2024
0.7.1-preview.1 114 5/10/2024
0.7.0 966 5/8/2024
0.6.1-preview.4 114 5/8/2024
0.6.1-preview.3 75 5/2/2024
0.6.1-preview.2 107 4/15/2024
0.6.1-preview.1 108 4/12/2024
0.6.0 1,481 4/10/2024
0.5.1-preview.3 110 4/10/2024
0.5.1-preview.2 104 4/3/2024
0.5.1-preview.1 115 4/3/2024
0.5.0 260 4/2/2024
0.4.1-preview.1 122 3/27/2024
0.4.0 926 3/20/2024
0.2.2-preview.2 99 3/20/2024
0.2.2-preview.1 99 3/18/2024
0.2.1 248 3/14/2024
0.2.1-preview.9 98 3/12/2024
0.2.1-preview.8 103 3/11/2024
0.2.1-preview.7 97 3/7/2024
0.2.1-preview.6 113 3/4/2024
0.2.1-preview.5 126 3/1/2024
0.2.1-preview.4 118 2/16/2024
0.2.1-preview.3 825 2/12/2024
0.2.1-preview.2 118 2/6/2024
0.2.1-preview.1 1,227 1/29/2024
0.2.0 307 1/29/2024
0.1.1-preview.1 100 1/29/2024
0.1.0 200 1/26/2024
0.1.0-preview.26 114 1/23/2024
0.1.0-preview.25 104 1/22/2024
0.1.0-preview.24 109 1/15/2024
0.1.0-preview.23 111 1/12/2024
0.1.0-preview.22 100 1/12/2024
0.1.0-preview.21 101 1/12/2024
0.1.0-preview.20 159 12/22/2023
0.1.0-preview.19 122 12/20/2023
0.1.0-preview.18 123 12/18/2023
0.1.0-preview.17 134 12/7/2023
0.1.0-preview.16 197 12/1/2023
0.1.0-preview.15 118 11/30/2023
0.1.0-preview.14 120 11/29/2023
0.1.0-preview.13 124 11/24/2023
0.1.0-preview.12 125 11/17/2023
0.1.0-preview.11 117 11/17/2023
0.1.0-preview.10 129 11/13/2023