NSmithy.Server.AspNetCore.Docs 0.7.0

dotnet add package NSmithy.Server.AspNetCore.Docs --version 0.7.0
                    
NuGet\Install-Package NSmithy.Server.AspNetCore.Docs -Version 0.7.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="NSmithy.Server.AspNetCore.Docs" Version="0.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NSmithy.Server.AspNetCore.Docs" Version="0.7.0" />
                    
Directory.Packages.props
<PackageReference Include="NSmithy.Server.AspNetCore.Docs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NSmithy.Server.AspNetCore.Docs --version 0.7.0
                    
#r "nuget: NSmithy.Server.AspNetCore.Docs, 0.7.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.
#:package NSmithy.Server.AspNetCore.Docs@0.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NSmithy.Server.AspNetCore.Docs&version=0.7.0
                    
Install as a Cake Addin
#tool nuget:?package=NSmithy.Server.AspNetCore.Docs&version=0.7.0
                    
Install as a Cake Tool

CI Docs NuGet .NET 10 License Smithy CLI

Preview: NSmithy is in preview; expect some API changes before 1.0. Protocol implementations are not yet on par with the Smithy reference implementations.

NSmithy

Docs · Examples · Design Docs · smithy.io

NSmithy is a .NET toolkit that turns a Smithy model into idiomatic C# at build time.

Features

  • Contract-first: The Smithy model is the source of truth. NSmithy generates C# model types, clients, and ASP.NET Core server stubs from it.
  • Protocol-agnostic: The same model can target multiple protocols; switching protocols requires no changes to client or server code.
  • Part of the Smithy ecosystem: A .NET service built with NSmithy can be called from clients generated for Java, TypeScript, Python, Go, Rust, Swift, and more, and vice versa.
  • Protocol support: REST JSON, REST XML, AWS JSON, RPC v2 CBOR, and native gRPC.
  • Streaming support: Event streaming, bidirectional streaming, and streaming blob payloads.
  • Smithy-native architecture: Follows Smithy's official code generator guidance.
  • Conformance-tested: Tested against official Smithy, AWS, and alloy conformance suites.

Quick Start

Install the templates and scaffold a contracts project, a server, and a client:

dotnet new install NSmithy.Templates

# A contracts project owns the Smithy model
dotnet new nsmithy-contracts -n HelloWorld.Contracts

# A server that implements the model's handler…
dotnet new nsmithy-server -n HelloWorld.Server --contracts HelloWorld.Contracts

# …and a typed client that calls it
dotnet new nsmithy-client -n HelloWorld.Client

The starter model is a single restJson1 operation; dotnet build runs codegen and produces the model types, IHelloServiceHandler interface, and typed HelloServiceClient. Implement the handler, and call the client:

// Server: implement the generated handler
internal sealed class HelloHandler : IHelloServiceHandler
{
    public Task<SayHelloOutput> SayHelloAsync(SayHelloInput input, CancellationToken ct = default) =>
        Task.FromResult(new SayHelloOutput($"Hello, {input.Name}!"));
}

// Client: call the typed client
var client = new HelloServiceClient(new Uri("http://localhost:5000"));
var response = await client.SayHelloAsync(new SayHelloInput("world"));
Console.WriteLine(response.Message); // Hello, world!

See the Quick Start guide for the full walkthrough.

Development

The recommended way to work on this repo is with Nix and devenv.

  1. Install Nix (recommended: Determinate Nix) and devenv.

  2. Optionally install direnv to activate the dev environment automatically when entering the directory (direnv allow). Without it, run devenv shell manually.

  3. Use the just recipes to build, test, and package:

    just          # list all available recipes
    just build    # build the codegen JAR and .NET solution
    just test     # run the test suite
    just fmt      # format all code
    just docs     # start the documentation dev server
    just ci       # run the full CI pipeline locally
    
  • Smithy: The IDL and protocol framework NSmithy is built on.
  • smithy4s: Scala codegen from Smithy models and the main inspiration for NSmithy.
  • alloy: Smithy extensions used by NSmithy for simpleRestJson and gRPC.
  • smithy-go / smithy-typescript: Official Smithy codegen plugins for Go and TypeScript.
  • TypeSpec: Microsoft's alternative API description language, with first-party .NET emitters.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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.7.0 31 7/30/2026
0.6.0 181 7/10/2026
0.5.0 88 7/9/2026
0.4.0 96 7/1/2026
0.3.0 108 6/21/2026
0.2.0 108 6/16/2026
0.1.0 110 6/8/2026
0.1.0-preview.15 53 5/28/2026
0.1.0-preview.14 60 5/28/2026
0.1.0-preview.13 49 5/28/2026
0.1.0-preview.12 53 5/27/2026