Codebelt.Extensions.Carter 1.0.0

dotnet add package Codebelt.Extensions.Carter --version 1.0.0
                    
NuGet\Install-Package Codebelt.Extensions.Carter -Version 1.0.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="Codebelt.Extensions.Carter" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Codebelt.Extensions.Carter" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Codebelt.Extensions.Carter" />
                    
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 Codebelt.Extensions.Carter --version 1.0.0
                    
#r "nuget: Codebelt.Extensions.Carter, 1.0.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 Codebelt.Extensions.Carter@1.0.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=Codebelt.Extensions.Carter&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Codebelt.Extensions.Carter&version=1.0.0
                    
Install as a Cake Tool

Codebelt.Extensions.Carter

A focused extension layer for Carter with configurable response negotiation primitives and endpoint metadata helpers for ASP.NET Core minimal APIs.

About

Codebelt.Extensions.Carter complements Carter by adding reusable negotiation infrastructure and endpoint convention extensions.

Use this package when you want to:

  • Add explicit response metadata from Carter route mappings.
  • Build on configurable negotiator abstractions.
  • Keep minimal API modules expressive and OpenAPI-friendly.

For concrete JSON, YAML, or XML negotiators, use one of the companion packages listed below.

CSharp Example

using Carter;
using Codebelt.Extensions.Carter;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddCarter();

var app = builder.Build();

app.MapGet("/status", () => new StatusResponse("ok"))
    .Produces<StatusResponse>(StatusCodes.Status200OK, "application/json")
    .ProducesProblem(StatusCodes.Status503ServiceUnavailable);

app.MapCarter();
app.Run();

public sealed record StatusResponse(string State);
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 (4)

Showing the top 4 NuGet packages that depend on Codebelt.Extensions.Carter:

Package Downloads
Codebelt.Extensions.Carter.AspNetCore.Xml

The Codebelt.Extensions.Carter.AspNetCore.Xml namespace contains types that complements the Codebelt.Extensions.Carter namespace by providing an XML response negotiator for Carter using System.Xml in the context of ASP.NET Core.

Codebelt.Extensions.Carter.AspNetCore.Text.Yaml

The Codebelt.Extensions.Carter.AspNetCore.Text.Yaml namespace contains types that complements the Codebelt.Extensions.Carter namespace by providing a YAML response negotiator for Carter using YamlDotNet in the context of ASP.NET Core.

Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json

The Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json namespace contains types that complements the Codebelt.Extensions.Carter namespace by providing an opinionated JSON response negotiator for Carter using Newtonsoft.Json in the context of ASP.NET Core. This is a Codebelt ecosystem alternative to Carter's built-in Newtonsoft.Json negotiator.

Codebelt.Extensions.Carter.AspNetCore.Text.Json

The Codebelt.Extensions.Carter.AspNetCore.Text.Json namespace contains types that complements the Codebelt.Extensions.Carter namespace by providing an opinionated JSON response negotiator for Carter using System.Text.Json in the context of ASP.NET Core. This is a Codebelt ecosystem alternative to Carter's built-in JSON negotiator.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 95 3/1/2026

Version: 1.0.0
Availability: .NET 10
 
# New Features
- ADDED ConfigurableResponseNegotiator<TOptions> class in the Codebelt.Extensions.Carter.Response namespace that provides an abstract, configurable base class for Carter response negotiators that serialize models using a StreamFormatter<TOptions> implementation
- ADDED EndpointConventionBuilderExtensions class in the Codebelt.Extensions.Carter namespace that consist of extension methods for the IEndpointConventionBuilder interface: Produces<TResponse> and Produces