Proxy generator configuration
Configure generation through properties and items inside the existing .csproj’s Project element. The examples in these reference pages are project fragments, not standalone project files. Item Include values supply MSBuild identities; the generator consumes each item’s named metadata.
Choose a topic
Section titled “Choose a topic”- Basic options: output path, namespace segments, source-file grouping, decorators.
- Library mode: collect models beyond endpoint references; separate CLI interface output.
- Emit interfaces: plain interfaces with no decorators and no runtime dependency.
- Type exclusions: omit types or namespace patterns.
- Namespace roots: remap output folders without changing API routes.
- Assembly-to-package mappings: import shared model packages.
- Type mapping: primitive mappings and
TypeToTsTypeoverrides. - Routing: conventional model-bound route options and runtime alignment.
- Output behavior: incremental writes, full deletion, and cleanup limitations.
MSBuild reference
Section titled “MSBuild reference”| Property or item | Default / required metadata | Topic |
|---|---|---|
CratisProxiesOutputPath | Empty disables generation | Basic |
CratisProxiesSegmentsToSkip | Empty resolves to 0 | Basic |
CratisProxiesUseSourceFileAsOutputFile | Off unless true | Basic |
CratisProxiesLibraryMode | false | Library mode |
CratisProxiesEmitInterfaces | false | Emit interfaces |
ExcludeType item | Include, TypeName | Exclusions |
ExcludeNamespace item | Include, Namespace | Exclusions |
NamespaceRoot item | Include, Namespace, Folder (may be empty) | Namespace roots |
AssemblyToPackageMapping item | Include, Assembly, Package | Package mappings |
TypeToTsType item | Include, TypeName, TsType; optional Package | Type mapping |
CratisProxiesSkipCommandNameInRoute | false | Routing |
CratisProxiesSkipQueryNameInRoute | false | Routing |
CratisProxiesApiPrefix | api | Routing |
CratisProxiesSkipIndexGeneration | Off unless true | Output behavior |
CratisProxiesSkipOutputDeletion | true in MSBuild; direct executable differs | Output behavior |
CratisProxiesSkipFileIndexTracking | false; setting true is currently ignored by the executable | Output behavior |