NSmithy.Codecs.Xml
0.18.1
See the version list below for details.
dotnet add package NSmithy.Codecs.Xml --version 0.18.1
NuGet\Install-Package NSmithy.Codecs.Xml -Version 0.18.1
<PackageReference Include="NSmithy.Codecs.Xml" Version="0.18.1" />
<PackageVersion Include="NSmithy.Codecs.Xml" Version="0.18.1" />
<PackageReference Include="NSmithy.Codecs.Xml" />
paket add NSmithy.Codecs.Xml --version 0.18.1
#r "nuget: NSmithy.Codecs.Xml, 0.18.1"
#:package NSmithy.Codecs.Xml@0.18.1
#addin nuget:?package=NSmithy.Codecs.Xml&version=0.18.1
#tool nuget:?package=NSmithy.Codecs.Xml&version=0.18.1
NSmithy
Docs · Quick start · Examples · Design docs · Changelog
NSmithy generates clients, ASP.NET Core servers, and model types in C# and F# from Smithy models as part of dotnet build. Smithy is a language-neutral interface definition language from AWS (why Smithy?). There is no separate codegen step, and a client and server generated from the same model agree on routes, serialization, and errors.
Preview: expect some API changes before 1.0.
Example
A model:
@restJson1
service HelloService {
version: "2006-03-01"
operations: [SayHello]
}
@readonly
@http(method: "GET", uri: "/hello/{name}")
operation SayHello {
input := {
@required
@httpLabel
name: String
}
output := {
@required
message: String
}
}
A server implements the generated handler interface and maps the generated routes:
builder.Services.AddHelloServiceHandler<HelloHandler>();
app.MapHelloService();
sealed class HelloHandler : IHelloServiceHandler
{
public Task<SayHelloOutput> SayHelloAsync(
SayHelloInput input,
CancellationToken cancellationToken = default
) => Task.FromResult(new SayHelloOutput($"Hello, {input.Name}!"));
}
A client calls it:
var client = new HelloServiceClient(new Uri("http://localhost:5000"));
var response = await client.SayHelloAsync(new SayHelloInput("world"));
Add an operation to the model and the server stops compiling until it is handled.
Quick start
With the .NET 10 SDK installed:
dotnet new install NSmithy.Templates
dotnet new nsmithy-contracts -n HelloWorld.Contracts --smithy-cli-package
dotnet new nsmithy-server -n HelloWorld.Server --contracts-project HelloWorld.Contracts --smithy-cli-package
dotnet run --project HelloWorld.Server
curl http://localhost:5000/hello/world
--smithy-cli-package gets the Smithy CLI and its Java runtime from NuGet. Omit it to use a Smithy CLI on your PATH. The quick start adds a client and walks through the generated code.
Features
- Protocols:
restJson1,simpleRestJson,rpcv2Cbor,rpcv2Json, and gRPC for clients and servers;awsJson1_0,awsJson1_1,awsQuery,ec2Query, andrestXmlfor clients. Coverage against the official Smithy protocol tests is on the protocol status page. - Clients: retries, pagination, waiters, endpoint rules, interceptors, and fake clients for tests.
- Servers: ASP.NET Core minimal APIs with validation, modeled authorization, fake handlers built from
@examples, generated API docs, and an experimental MCP adapter. - F#: records, discriminated unions, clients, and servers. Paginators, waiters, endpoint rules, and fakes are C# only. See the F# guide.
- Distribution: share a model as a NuGet package or a Maven JAR. See distributing contracts.
Contributing
See CONTRIBUTING.md for the development environment and build recipes.
Related projects
| Product | Versions 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. |
-
net10.0
- NSmithy.Core (>= 0.18.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NSmithy.Codecs.Xml:
| Package | Downloads |
|---|---|
|
NSmithy.Protocols.RestXml
AWS restXml protocol for NSmithy clients. |
|
|
NSmithy.Protocols.AwsQuery
AWS Query and EC2 Query protocols for NSmithy clients. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.23.0 | 111 | 11/22/2026 |
| 0.22.0 | 115 | 11/21/2026 |
| 0.21.0 | 119 | 11/20/2026 |
| 0.20.1 | 121 | 11/15/2026 |
| 0.20.0 | 121 | 11/15/2026 |
| 0.19.0 | 120 | 11/8/2026 |
| 0.18.2 | 118 | 11/8/2026 |
| 0.18.1 | 116 | 11/7/2026 |
| 0.18.0 | 120 | 11/4/2026 |
| 0.17.0 | 128 | 11/2/2026 |
| 0.16.0 | 132 | 11/1/2026 |
| 0.15.1 | 122 | 10/29/2026 |
| 0.15.0 | 124 | 10/28/2026 |
| 0.14.0 | 128 | 10/25/2026 |
| 0.13.0 | 120 | 10/16/2026 |
| 0.12.0 | 122 | 10/11/2026 |
| 0.11.0 | 120 | 10/8/2026 |
| 0.10.1 | 135 | 10/2/2026 |
| 0.10.0 | 152 | 9/7/2026 |
| 0.9.0 | 142 | 8/25/2026 |