Gunslinger.OpenAPI.CLI 3.0.1

dotnet tool install --global Gunslinger.OpenAPI.CLI --version 3.0.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Gunslinger.OpenAPI.CLI --version 3.0.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Gunslinger.OpenAPI.CLI&version=3.0.1
nuke :add-package Gunslinger.OpenAPI.CLI --version 3.0.1

Gunslinger Templating Engine - CLI Version

The Gunslinger templating engine is built on top of the Handlebars templating system, which is an enhancement of the Logic-less Mustache templating system.

This is the OpenAPI version of Gunslinger, which means it is designed to generate Client SDKs from OpenAPI 3.0.1 schemas. Beginning in version 2.0 there is support for Swagger 2.0. I've provided some new additional templates and configuration options that can be found here.

I've continued in the tradition of naming this tool after a style of facial hair.

Gunslinger Beard

The primary idea is that a json config file and some templates can provide everything you need to generate massive portions of your project in a very flexible way.

This version is designed to be installed as a command line tool on the host machine which is probably going to be a developer machine, but could potentially be a build server.

Use the wiki to see documentation and explanation of different elements.

CLI Tool

Project Setup

These three lines were needed in the csproj:

<PackAsTool>true</PackAsTool>
<ToolCommandName>gsoa</ToolCommandName>
<PackageOutputPath>./nupkg</PackageOutputPath>

Building and deploying

Terminal command must be run in the terminal from the location of the csproj. I think install works differently if using a non-local nupkg. More on that when I figure it out.

  • build solution
  • create a nupkg in the PackageOutputPath location dotnet pack
  • install the tool globally dotnet tool install -g --add-source ./nupkg Gunslinger.OpenAPI.CLI --version [version number here]

Update the tool dotnet tool update -g --add-source ./nupkg Gunslinger.OpenAPI.CLI

Uninstall the tool dotnet tool uninstall Gunslinger.OpenAPI.CLI -g

Using Docker for testing

Build from solution root: docker build -t drolling/gunslinger-api-tests:latest -f TestApiProject/Dockerfile .

Push: docker push drolling/gunslinger-api-tests:latest

Run: docker run -p 8080:80 -d drolling/gunslinger-api-tests:latest

navigate to

Test the Swagger API

dotnet tool install documentation

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
3.0.1 256 2/16/2023
3.0.0 262 1/6/2023
2.0.0 306 11/16/2022
1.1.0 347 10/18/2022
1.0.1 345 10/18/2022
1.0.0 352 10/17/2022