Workleap.OpenApi.MSBuild 0.9.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. 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.2 33 6/25/2024
0.9.1-preview.1 32 6/14/2024
0.9.0 1,002 6/12/2024
0.8.2-preview.4 32 6/12/2024
0.8.2-preview.3 38 6/10/2024
0.8.2-preview.2 43 5/31/2024
0.8.2-preview.1 37 5/31/2024
0.8.1 974 5/24/2024
0.8.1-preview.1 49 5/24/2024
0.8.0 106 5/21/2024
0.7.1-preview.4 42 5/21/2024
0.7.1-preview.3 37 5/21/2024
0.7.1-preview.2 38 5/21/2024
0.7.1-preview.1 49 5/10/2024
0.7.0 842 5/8/2024
0.6.1-preview.4 47 5/8/2024
0.6.1-preview.3 17 5/2/2024
0.6.1-preview.2 52 4/15/2024
0.6.1-preview.1 53 4/12/2024
0.6.0 1,343 4/10/2024
0.5.1-preview.3 42 4/10/2024
0.5.1-preview.2 49 4/3/2024
0.5.1-preview.1 48 4/3/2024
0.5.0 154 4/2/2024
0.4.1-preview.1 59 3/27/2024
0.4.0 816 3/20/2024
0.2.2-preview.2 46 3/20/2024
0.2.2-preview.1 46 3/18/2024
0.2.1 134 3/14/2024
0.2.1-preview.9 48 3/12/2024
0.2.1-preview.8 49 3/11/2024
0.2.1-preview.7 47 3/7/2024
0.2.1-preview.6 54 3/4/2024
0.2.1-preview.5 59 3/1/2024
0.2.1-preview.4 52 2/16/2024
0.2.1-preview.3 769 2/12/2024
0.2.1-preview.2 52 2/6/2024
0.2.1-preview.1 1,166 1/29/2024
0.2.0 206 1/29/2024
0.1.1-preview.1 44 1/29/2024
0.1.0 82 1/26/2024
0.1.0-preview.26 54 1/23/2024
0.1.0-preview.25 49 1/22/2024
0.1.0-preview.24 57 1/15/2024
0.1.0-preview.23 55 1/12/2024
0.1.0-preview.22 50 1/12/2024
0.1.0-preview.21 49 1/12/2024
0.1.0-preview.20 101 12/22/2023
0.1.0-preview.19 68 12/20/2023
0.1.0-preview.18 65 12/18/2023
0.1.0-preview.17 81 12/7/2023
0.1.0-preview.16 140 12/1/2023
0.1.0-preview.15 63 11/30/2023
0.1.0-preview.14 59 11/29/2023
0.1.0-preview.13 68 11/24/2023
0.1.0-preview.12 65 11/17/2023
0.1.0-preview.11 56 11/17/2023
0.1.0-preview.10 71 11/13/2023