Skip to content

Installation

Prerequisites

Requirement Details
.NET SDK Version 10.0
NuGet feed A global NuGet.Config file configured with the correct nuget feed
IDE setup Recommended for YAML schema validation and completion

Global NuGet.Config

Add the relevant package source to your global NuGet.Config file, usually ~/.nuget/NuGet/NuGet.Config.

<configuration>
    <packageSources>
        <clear />
        <add key="nuget_feed" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    </packageSources>
</configuration>

Packages

Add the package to your project:

<ItemGroup>
  <PackageReference Include="QaaS.Mocker" Version="x.x.x" />
  <PackageReference Include="QaaS.Common.Generators" Version="x.x.x" />
  <PackageReference Include="QaaS.Common.Processors" Version="x.x.x" />
</ItemGroup>
dotnet add package QaaS.Mocker
dotnet add package QaaS.Common.Generators
dotnet add package QaaS.Common.Processors

QaaS.Common.Generators is optional in general, but it is used by the quick-start examples on this site. QaaS.Common.Processors is also optional, but install it when you want packaged reusable processors instead of only project-local processor classes.

Project Template

Use QaaS.Mocker.Template when you want a ready-to-run mocker repo instead of wiring packages by hand.

dotnet new install QaaS.Mocker.Template
dotnet new qaas-mocker -n MyServiceMock

The generated repo includes:

  • NuGet.config pointing at: https://api.nuget.org/v3/index.json
  • QaaS.Mocker with Version="x.x.x" (set a concrete package version for your project)
  • a minimal /health mock under Servers
  • Dockerfile and generated GitHub Actions CI

If you use Artifactory or another private feed, update the generated NuGet.config before the first restore.

IDE Setup

Use the dedicated IDE Setup page for the Mocker-specific JSON schema and editor mappings.