Workleap.OpenApi.MSBuild 0.9.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 0.9.0                
NuGet\Install-Package Workleap.OpenApi.MSBuild -Version 0.9.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="0.9.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.
paket add Workleap.OpenApi.MSBuild --version 0.9.0                
#r "nuget: Workleap.OpenApi.MSBuild, 0.9.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.
// Install Workleap.OpenApi.MSBuild as a Cake Addin
#addin nuget:?package=Workleap.OpenApi.MSBuild&version=0.9.0

// Install Workleap.OpenApi.MSBuild as a Cake Tool
#tool nuget:?package=Workleap.OpenApi.MSBuild&version=0.9.0                

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 how they configure the OpenApiServiceProfile MSBuild property (backend (default) or frontend).

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.

With the system test

This command ./Run-SystemTest.ps1 will:

  1. Pack the MSBuild library
  2. Build the WebApi.MsBuild.SystemTest and inject the previously packed library

Be careful since it will update the project dependencies to use a local version: do not commit this.

Also if you run it multiple time on the same branch you need to clear the local cache %UserProfile%\.nuget\packages\workleap.openapi.msbuild since the name won't change.

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. 
.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.

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
0.9.1-preview.27 32 10/30/2024
0.9.1-preview.26 35 10/28/2024
0.9.1-preview.25 30 10/28/2024
0.9.1-preview.24 35 10/28/2024
0.9.1-preview.23 44 10/2/2024
0.9.1-preview.22 47 10/1/2024
0.9.1-preview.21 38 10/1/2024
0.9.1-preview.20 40 10/1/2024
0.9.1-preview.19 35 10/1/2024
0.9.1-preview.18 46 9/30/2024
0.9.1-preview.17 47 8/27/2024
0.9.1-preview.16 41 8/27/2024
0.9.1-preview.15 41 8/27/2024
0.9.1-preview.14 63 8/16/2024
0.9.1-preview.13 66 8/16/2024
0.9.1-preview.12 60 8/16/2024
0.9.1-preview.11 58 8/15/2024
0.9.1-preview.10 61 8/15/2024
0.9.1-preview.9 62 8/14/2024
0.9.1-preview.8 62 8/14/2024
0.9.1-preview.7 36 8/5/2024
0.9.1-preview.6 65 7/18/2024
0.9.1-preview.5 46 7/17/2024
0.9.1-preview.4 56 7/16/2024
0.9.1-preview.3 37 7/5/2024
0.9.1-preview.2 50 6/25/2024
0.9.1-preview.1 48 6/14/2024
0.9.0 11,883 6/12/2024
0.8.2-preview.4 45 6/12/2024
0.8.2-preview.3 50 6/10/2024
0.8.2-preview.2 56 5/31/2024
0.8.2-preview.1 50 5/31/2024
0.8.1 1,327 5/24/2024
0.8.1-preview.1 60 5/24/2024
0.8.0 166 5/21/2024
0.7.1-preview.4 53 5/21/2024
0.7.1-preview.3 49 5/21/2024
0.7.1-preview.2 49 5/21/2024
0.7.1-preview.1 59 5/10/2024
0.7.0 885 5/8/2024
0.6.1-preview.4 60 5/8/2024
0.6.1-preview.3 26 5/2/2024
0.6.1-preview.2 61 4/15/2024
0.6.1-preview.1 61 4/12/2024
0.6.0 1,417 4/10/2024
0.5.1-preview.3 57 4/10/2024
0.5.1-preview.2 59 4/3/2024
0.5.1-preview.1 58 4/3/2024
0.5.0 191 4/2/2024
0.4.1-preview.1 75 3/27/2024
0.4.0 852 3/20/2024
0.2.2-preview.2 52 3/20/2024
0.2.2-preview.1 58 3/18/2024
0.2.1 169 3/14/2024
0.2.1-preview.9 53 3/12/2024
0.2.1-preview.8 55 3/11/2024
0.2.1-preview.7 52 3/7/2024
0.2.1-preview.6 60 3/4/2024
0.2.1-preview.5 67 3/1/2024
0.2.1-preview.4 62 2/16/2024
0.2.1-preview.3 779 2/12/2024
0.2.1-preview.2 71 2/6/2024
0.2.1-preview.1 1,182 1/29/2024
0.2.0 230 1/29/2024
0.1.1-preview.1 57 1/29/2024
0.1.0 112 1/26/2024
0.1.0-preview.26 70 1/23/2024
0.1.0-preview.25 57 1/22/2024
0.1.0-preview.24 67 1/15/2024
0.1.0-preview.23 68 1/12/2024
0.1.0-preview.22 56 1/12/2024
0.1.0-preview.21 63 1/12/2024
0.1.0-preview.20 115 12/22/2023
0.1.0-preview.19 80 12/20/2023
0.1.0-preview.18 79 12/18/2023
0.1.0-preview.17 89 12/7/2023
0.1.0-preview.16 148 12/1/2023
0.1.0-preview.15 81 11/30/2023
0.1.0-preview.14 67 11/29/2023
0.1.0-preview.13 76 11/24/2023
0.1.0-preview.12 79 11/17/2023
0.1.0-preview.11 65 11/17/2023
0.1.0-preview.10 84 11/13/2023