Installation
OpenAPI Code Generator is distributed as a .NET tool via NuGet under the package name Nikcio.OpenApiCodeGen.
Prerequisites
Section titled “Prerequisites”- .NET 10 SDK or later
Global Tool
Section titled “Global Tool”Install as a global tool available anywhere on your system:
dotnet tool install --global Nikcio.OpenApiCodeGenAfter installation, the openapi-codegen command is available globally:
openapi-codegen --versionUpdating
Section titled “Updating”dotnet tool update --global Nikcio.OpenApiCodeGenUninstalling
Section titled “Uninstalling”dotnet tool uninstall --global Nikcio.OpenApiCodeGenLocal Tool
Section titled “Local Tool”Install as a local tool scoped to your repository. This is recommended for team projects to ensure consistent versions:
# Create a tool manifest (if you don't have one)dotnet new tool-manifest
# Install the tooldotnet tool install Nikcio.OpenApiCodeGenWhen installed locally, run the tool with dotnet tool run:
dotnet tool run openapi-codegen petstore.yaml -o Models.csOr restore and use directly after dotnet tool restore:
dotnet tool restoreopenapi-codegen petstore.yaml -o Models.csTry It in the Browser
Section titled “Try It in the Browser”No installation needed to evaluate the generator — paste a spec (or load one from a URL) into the Playground and generate C# code right on the page.