Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .bot/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# .bot Workspace
This folder is reserved for local-only AI working material such as:
- brainstorm notes
- draft implementation plans
- design alternatives
- temporary agent state
Keep this folder out of source control. Move only finalized, non-confidential guidance into `AGENTS.md`.
# .bot Workspace

This folder is reserved for local-only AI working material such as:

- brainstorm notes
- draft implementation plans
- design alternatives
- temporary agent state

Keep this folder out of source control. Move only finalized, non-confidential guidance into `AGENTS.md`.
8 changes: 4 additions & 4 deletions .docfx/BuildDocfxImage.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$version = minver -i -t v -v w
docfx metadata docfx.json
docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
get-childItem -recurse -path api -include *.yml, .manifest | remove-item
$version = minver -i -t v -v w
docfx metadata docfx.json
docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
get-childItem -recurse -path api -include *.yml, .manifest | remove-item
32 changes: 16 additions & 16 deletions .docfx/Dockerfile.docfx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
ARG NGINX_VERSION=1.31-alpine
FROM --platform=$BUILDPLATFORM dhi.io/nginx:${NGINX_VERSION} AS base
RUN rm -rf /usr/share/nginx/html/*
FROM --platform=$BUILDPLATFORM codebeltnet/docfx:2 AS build
ADD [".", "docfx"]
RUN cd docfx; \
docfx build
FROM dhi.io/nginx:${NGINX_VERSION} AS final
WORKDIR /usr/share/nginx/html
COPY --from=build /build/docfx/wwwroot /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
ARG NGINX_VERSION=1.31-alpine

FROM --platform=$BUILDPLATFORM dhi.io/nginx:${NGINX_VERSION} AS base
RUN rm -rf /usr/share/nginx/html/*

FROM --platform=$BUILDPLATFORM codebeltnet/docfx:2 AS build

ADD [".", "docfx"]

RUN cd docfx; \
docfx build

FROM dhi.io/nginx:${NGINX_VERSION} AS final
WORKDIR /usr/share/nginx/html
COPY --from=build /build/docfx/wwwroot /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
6 changes: 3 additions & 3 deletions .docfx/PublishDocfxImage.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$version = minver -i -t v -v w
docker tag carter-docfx:$version jcr.codebelt.net/geekle/carter-docfx:$version
docker push jcr.codebelt.net/geekle/carter-docfx:$version
$version = minver -i -t v -v w
docker tag carter-docfx:$version jcr.codebelt.net/geekle/carter-docfx:$version
docker push jcr.codebelt.net/geekle/carter-docfx:$version
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
uid: Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json
summary: *content
---
When your Carter application needs the full power of Newtonsoft.Json—custom contract resolvers, `StringEnumConverter`, `JsonIgnore` attributes, or legacy compatibility mode—reach for the `Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json` namespace. The central type, `NewtonsoftJsonNegotiator`, handles JSON response serialization through the Carter `HttpResponse.Negotiate()` pipeline.
This negotiator registers the `application/json` media type and uses a configurable `NewtonsoftJsonFormatterOptions` to control serialization settings, supported media types, and exception-descriptor formatting. It integrates with ASP.NET Core's options pattern and supports the `Accept-Charset` header for character-encoding negotiation.
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
### When to use
Choose `NewtonsoftJsonNegotiator` when you depend on Newtonsoft.Json features that System.Text.Json does not provide—such as `TypeNameHandling`, custom `JsonConverter` pipelines, `PreserveReferencesHandling`, or `ISerializable` support. This negotiator is also the right choice when migrating an existing Newtonsoft.Json-based codebase to Carter without changing your serialization stack.
### Start here
Install the `Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json` NuGet package, then register `NewtonsoftJsonNegotiator` as the response negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`.
---
uid: Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json
summary: *content
---
When your Carter application needs the full power of Newtonsoft.Json—custom contract resolvers, `StringEnumConverter`, `JsonIgnore` attributes, or legacy compatibility mode—reach for the `Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json` namespace. The central type, `NewtonsoftJsonNegotiator`, handles JSON response serialization through the Carter `HttpResponse.Negotiate()` pipeline.

This negotiator registers the `application/json` media type and uses a configurable `NewtonsoftJsonFormatterOptions` to control serialization settings, supported media types, and exception-descriptor formatting. It integrates with ASP.NET Core's options pattern and supports the `Accept-Charset` header for character-encoding negotiation.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

### When to use

Choose `NewtonsoftJsonNegotiator` when you depend on Newtonsoft.Json features that System.Text.Json does not provide—such as `TypeNameHandling`, custom `JsonConverter` pipelines, `PreserveReferencesHandling`, or `ISerializable` support. This negotiator is also the right choice when migrating an existing Newtonsoft.Json-based codebase to Carter without changing your serialization stack.

### Start here

Install the `Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json` NuGet package, then register `NewtonsoftJsonNegotiator` as the response negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
uid: Codebelt.Extensions.Carter.AspNetCore.Text.Json
summary: *content
---
Use the `Codebelt.Extensions.Carter.AspNetCore.Text.Json` namespace when your Carter application needs JSON response serialization backed by `System.Text.Json`—the high-performance, allocation-friendly JSON serializer built into the ASP.NET Core runtime. The `JsonResponseNegotiator` type integrates this serializer into the Carter `HttpResponse.Negotiate()` pipeline.
This negotiator uses the `JsonFormatterOptions` to configure serialization behavior, supported media types, and exception-descriptor formatting. It respects the `Accept` and `Accept-Charset` headers for content-type and encoding negotiation.
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
### When to use
Choose `JsonResponseNegotiator` when you prefer the modern `System.Text.Json` stack for its performance characteristics and native ASP.NET Core integration, when you have no dependency on Newtonsoft.Json-specific features, or when you want to minimize external dependencies beyond the ASP.NET Core framework.
### Start here
Install the `Codebelt.Extensions.Carter.AspNetCore.Text.Json` NuGet package, then register `JsonResponseNegotiator` as the response negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`.
---
uid: Codebelt.Extensions.Carter.AspNetCore.Text.Json
summary: *content
---
Use the `Codebelt.Extensions.Carter.AspNetCore.Text.Json` namespace when your Carter application needs JSON response serialization backed by `System.Text.Json`—the high-performance, allocation-friendly JSON serializer built into the ASP.NET Core runtime. The `JsonResponseNegotiator` type integrates this serializer into the Carter `HttpResponse.Negotiate()` pipeline.

This negotiator uses the `JsonFormatterOptions` to configure serialization behavior, supported media types, and exception-descriptor formatting. It respects the `Accept` and `Accept-Charset` headers for content-type and encoding negotiation.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

### When to use

Choose `JsonResponseNegotiator` when you prefer the modern `System.Text.Json` stack for its performance characteristics and native ASP.NET Core integration, when you have no dependency on Newtonsoft.Json-specific features, or when you want to minimize external dependencies beyond the ASP.NET Core framework.

### Start here

Install the `Codebelt.Extensions.Carter.AspNetCore.Text.Json` NuGet package, then register `JsonResponseNegotiator` as the response negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
uid: Codebelt.Extensions.Carter.AspNetCore.Text.Yaml
summary: *content
---
Enable YAML response negotiation in your Carter application with the `Codebelt.Extensions.Carter.AspNetCore.Text.Yaml` namespace. The `YamlResponseNegotiator` type, powered by YamlDotNet, lets your endpoints produce YAML responses through the standard `HttpResponse.Negotiate()` pipeline.
This negotiator uses `YamlFormatterOptions` to configure serialization settings, supported media types, and character encoding. It is well-suited for tooling, configuration APIs, DevOps scenarios, and any environment where YAML is the preferred interchange format.
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
### When to use
Choose `YamlResponseNegotiator` when your API consumers expect YAML-formatted responses—common in CI/CD tooling, configuration management, infrastructure-as-code services, and cross-platform build pipelines where YAML's human readability and comment support add value over JSON.
### Start here
Install the `Codebelt.Extensions.Carter.AspNetCore.Text.Yaml` NuGet package, then register `YamlResponseNegotiator` as the response negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`.
---
uid: Codebelt.Extensions.Carter.AspNetCore.Text.Yaml
summary: *content
---
Enable YAML response negotiation in your Carter application with the `Codebelt.Extensions.Carter.AspNetCore.Text.Yaml` namespace. The `YamlResponseNegotiator` type, powered by YamlDotNet, lets your endpoints produce YAML responses through the standard `HttpResponse.Negotiate()` pipeline.

This negotiator uses `YamlFormatterOptions` to configure serialization settings, supported media types, and character encoding. It is well-suited for tooling, configuration APIs, DevOps scenarios, and any environment where YAML is the preferred interchange format.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

### When to use

Choose `YamlResponseNegotiator` when your API consumers expect YAML-formatted responses—common in CI/CD tooling, configuration management, infrastructure-as-code services, and cross-platform build pipelines where YAML's human readability and comment support add value over JSON.

### Start here

Install the `Codebelt.Extensions.Carter.AspNetCore.Text.Yaml` NuGet package, then register `YamlResponseNegotiator` as the response negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`.
34 changes: 17 additions & 17 deletions .docfx/api/namespaces/Codebelt.Extensions.Carter.AspNetCore.Xml.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
uid: Codebelt.Extensions.Carter.AspNetCore.Xml
summary: *content
---
Add XML response capability to your Carter application with the `Codebelt.Extensions.Carter.AspNetCore.Xml` namespace. The `XmlResponseNegotiator` type, built on `System.Xml.XmlWriter`, produces standards-compliant XML responses through the Carter `HttpResponse.Negotiate()` pipeline.
This negotiator uses `XmlFormatterOptions` to configure XML writer settings, supported media types, and exception-descriptor formatting. It supports the `Accept` and `Accept-Charset` headers for content-type and encoding negotiation, and is suitable for legacy interoperability, SOA-style APIs, and enterprise integration scenarios.
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
### When to use
Choose `XmlResponseNegotiator` when your API must interoperate with legacy systems that require XML, when the API contract is defined by XSD schemas, or when you need standards-compliant XML output for enterprise integration workflows (e.g., SOAP-adjacent services, BizTalk, or SAP connectors).
### Start here
Install the `Codebelt.Extensions.Carter.AspNetCore.Xml` NuGet package, then register `XmlResponseNegotiator` as the response negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`.
---
uid: Codebelt.Extensions.Carter.AspNetCore.Xml
summary: *content
---
Add XML response capability to your Carter application with the `Codebelt.Extensions.Carter.AspNetCore.Xml` namespace. The `XmlResponseNegotiator` type, built on `System.Xml.XmlWriter`, produces standards-compliant XML responses through the Carter `HttpResponse.Negotiate()` pipeline.

This negotiator uses `XmlFormatterOptions` to configure XML writer settings, supported media types, and exception-descriptor formatting. It supports the `Accept` and `Accept-Charset` headers for content-type and encoding negotiation, and is suitable for legacy interoperability, SOA-style APIs, and enterprise integration scenarios.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

### When to use

Choose `XmlResponseNegotiator` when your API must interoperate with legacy systems that require XML, when the API contract is defined by XSD schemas, or when you need standards-compliant XML output for enterprise integration workflows (e.g., SOAP-adjacent services, BizTalk, or SAP connectors).

### Start here

Install the `Codebelt.Extensions.Carter.AspNetCore.Xml` NuGet package, then register `XmlResponseNegotiator` as the response negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
uid: Codebelt.Extensions.Carter.Response
summary: *content
---
Expand Down
48 changes: 24 additions & 24 deletions .docfx/api/namespaces/Codebelt.Extensions.Carter.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
uid: Codebelt.Extensions.Carter
summary: *content
---
Build Carter-based ASP.NET Core minimal APIs with configurable response negotiation and endpoint metadata. The `Codebelt.Extensions.Carter` namespace gives you the infrastructure to plug content-aware response serialization into the Carter pipeline—letting `HttpResponse.Negotiate()` automatically select the right serializer based on the client's Accept header.
Use this namespace when you want to:<br/>
- Add OpenAPI/OpenAPI-like produces metadata to your endpoints using `Produces<TResponse>` and `Produces` extension methods.<br/>
- Build or integrate a custom response negotiator via `ConfigurableResponseNegotiator<TOptions>`.<br/>
- Choose from format-specific negotiator packages for JSON (Newtonsoft.Json or System.Text.Json), YAML, or XML.
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
### Start here
For most applications, install one of the format-specific negotiator packages (e.g., `Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json`) and register the negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`. Then add produces metadata to your endpoints using the `Produces<TResponse>` extension method on `IEndpointConventionBuilder`.
If you need a custom serialization format, derive from `ConfigurableResponseNegotiator<TOptions>` in the `Codebelt.Extensions.Carter.Response` namespace and supply your own formatter.
### Extension Members
|Type|Ext|Methods|
|--:|:-:|---|
|IEndpointConventionBuilder|⬇️|`Produces<TResponse>`, `Produces`|
---
uid: Codebelt.Extensions.Carter
summary: *content
---
Build Carter-based ASP.NET Core minimal APIs with configurable response negotiation and endpoint metadata. The `Codebelt.Extensions.Carter` namespace gives you the infrastructure to plug content-aware response serialization into the Carter pipeline—letting `HttpResponse.Negotiate()` automatically select the right serializer based on the client's Accept header.

Use this namespace when you want to:<br/>
- Add OpenAPI/OpenAPI-like produces metadata to your endpoints using `Produces<TResponse>` and `Produces` extension methods.<br/>
- Build or integrate a custom response negotiator via `ConfigurableResponseNegotiator<TOptions>`.<br/>
- Choose from format-specific negotiator packages for JSON (Newtonsoft.Json or System.Text.Json), YAML, or XML.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

### Start here

For most applications, install one of the format-specific negotiator packages (e.g., `Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json`) and register the negotiator in your Carter configuration via `CarterConfigurator.WithResponseNegotiator<T>()`. Then add produces metadata to your endpoints using the `Produces<TResponse>` extension method on `IEndpointConventionBuilder`.

If you need a custom serialization format, derive from `ConfigurableResponseNegotiator<TOptions>` in the `Codebelt.Extensions.Carter.Response` namespace and supply your own formatter.

### Extension Members

|Type|Ext|Methods|
|--:|:-:|---|
|IEndpointConventionBuilder|⬇️|`Produces<TResponse>`, `Produces`|
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
uid: Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json.NewtonsoftJsonNegotiator
summary: *content
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
uid: Codebelt.Extensions.Carter.AspNetCore.Text.Json.JsonResponseNegotiator
summary: *content
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
uid: Codebelt.Extensions.Carter.AspNetCore.Text.Yaml.YamlResponseNegotiator
summary: *content
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
uid: Codebelt.Extensions.Carter.AspNetCore.Xml.XmlResponseNegotiator
summary: *content
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
uid: Codebelt.Extensions.Carter.EndpointConventionBuilderExtensions
summary: *content
---
Expand Down
Loading
Loading