Eternet.Mediator.EndpointManifest.Generator
3.7.0
Prefix Reserved
See the version list below for details.
dotnet add package Eternet.Mediator.EndpointManifest.Generator --version 3.7.0
NuGet\Install-Package Eternet.Mediator.EndpointManifest.Generator -Version 3.7.0
<PackageReference Include="Eternet.Mediator.EndpointManifest.Generator" Version="3.7.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Eternet.Mediator.EndpointManifest.Generator" Version="3.7.0" />
<PackageReference Include="Eternet.Mediator.EndpointManifest.Generator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Eternet.Mediator.EndpointManifest.Generator --version 3.7.0
#r "nuget: Eternet.Mediator.EndpointManifest.Generator, 3.7.0"
#:package Eternet.Mediator.EndpointManifest.Generator@3.7.0
#addin nuget:?package=Eternet.Mediator.EndpointManifest.Generator&version=3.7.0
#tool nuget:?package=Eternet.Mediator.EndpointManifest.Generator&version=3.7.0
Eternet.Mediator.EndpointManifest.Generator
Analyzer package that emits the public Eternet.Mediator.Generated.EndpointManifestProvider carrier for mediator
contract assemblies.
Use this package in *.Contracts projects together with:
Eternet.Mediator.EndpointModel<EternetGenerateEndpointManifest>true</EternetGenerateEndpointManifest>
This package is intentionally narrower than Eternet.Mediator.Generator. It only carries the manifest-emission
generator needed by contract packages, while runtime/controller generation remains in the broader mediator generator
package.
The generator emits a manifest for any assembly that contains endpoint descriptors. ApiGatewaySourceService can still
add source-service identity, but it is not required for manifest emission.
Services that can safely forward every gateway request to a fully isolated testing environment can add
[assembly: ApiGatewayTestingSupport]. Services with partial support can instead add
[ApiGatewayEndpointTestingSupport] to each supported endpoint contract or OData entity-set class. The generator records
the selected scope in the manifest and reports compile-time error EM9012 if an assembly combines the global and
endpoint-level modes.
Relative gateway routes are composed below their OperationNamespace. The generator reports warning EM9013 when a
relative route already starts with that namespace because it would publish a duplicated path such as
Networking/Networking/.... Remove the namespace segment from the route, or set IsRouteAbsolute = true when the
declared route intentionally owns the complete public path.
New public contracts should mark the abstract endpoint contract with EndpointGroup, not GenerateEndpoint.
GenerateEndpoint is server-only opt-in metadata.
EndpointManifestProvider.ManifestJson is intentionally public so source generators in consuming projects can read the
manifest from metadata references during compilation. The sidecar file remains the preferred runtime/build artifact when
the consuming tool is not a source generator.
Types marked with GenerateHttpClient, or nested inside a GenerateHttpClient container, are intentionally excluded
from the emitted manifest because the current assembly consumes them as outbound descriptors instead of serving them.
For the current contract authoring model that feeds this generator, see
../docs/contracts-and-transport-authoring.md and ../docs/endpoint-manifest-ecosystem.md.
OData capability publication
[ContractCapability(Publish = false)] on an OData entity-set declaration omits its agent capability while preserving
the OData model, HTTP descriptor, schema and generated client/server surface. Inherited publication decisions are
honored; an explicit entity-set declaration overrides its inherited decision, including Publish = true. An entity
set without a publication override retains the default publication behavior. This flag does not change endpoint
authentication or authorization.
Client export contract decisions
The client export (EternetGenerateClientExport=true) is documented in ../../../docs/typescript/contract-export-v1.md.
These decisions settle the review findings of issue #908:
When a whole-object standard [FromBody] request declares a JSON converter, the generated controller and HTTP client use that
converter. Client export cannot infer an arbitrary converter's input wire shape and reports EMCX001 instead of
publishing a schema based on CLR properties. The export is opt-in; the ordinary endpoint manifest remains available.
Contracts needing client export require a future explicit, validated input-wire schema associated with the converter.
That schema must distinguish secret-bearing transport input from any redacted serialization. Until that capability is
implemented, keep such contracts on a previously supported transport path and preserve their existing validation;
disabling or suppressing the diagnostic does not produce a reliable export.
- Enums are contracts of their declared members. Capability
input.jsonSchemaand the export keep the canonicalenumnames; neither describes the extra casings or integers thatJsonStringEnumConverteralso accepts. The export marks string enums whose converter allows integers withallowsIntegerValues: true, because such a converter also writes an undeclared value (for example(State)99) as a JSON integer. - No shared Eternet host setup installs a global
JsonStringEnumConverter; each service configures MVC JSON options itself, and some write enums as numbers. An enum serialized as JSON in an exported contract must therefore declareJsonStringEnumConverter<T>orJsonNumberEnumConverter<T>on the enum type, otherwise the export fails withEMCX010. Route, query, header and form bindings and dictionary keys do not need it. - A projected
DomainResultresponse whose type is also serialized as an ordinary DTO with a different wire shape is exported as<type id>@projection; types used only as responses keep their ids.EMCX007checks every projection. - FluentValidation rules come from the single public validator constructor, or from the rules common to all public constructors when there are several.
- Pause-capable pipelines describe their HTTP 202
PipelinePausedResponseoutcome inresponse.paused. - Item 13 (implicit requiredness of non-nullable query, header and form members) is not applicable yet: generated
controllers are emitted without
#nullable enable, so their reference parameters are nullable-oblivious, MVC infers no[Required], and the endpoint accepts the omission. Those bindings stay optional unless the member isrequired. It becomes applicable only if controller generation emits nullable annotations, which changes runtime validation of every generated endpoint and needs its own change. - The
PipelinePausedResponseprojection ({ reason }) is registered after every DTO is known, under<type id>@projectionwhen a[FromBody]PipelinePausedResponsemember makes the plain id an ordinary DTO. - A named type reached from a route, query, header or form binding is not treated as JSON; the host-dependent enum
check (
EMCX010) runs only for types a JSON use also reaches.
Polymorphic response schemas
A response member whose declared type lists [JsonDerivedType] alternatives is published in capability
output.jsonSchema as a oneOf with one closed object per derived type, as System.Text.Json writes it. Each
alternative requires the discriminator property ($type unless [JsonPolymorphic] names another, including an empty
name) with its value as a single-value enum, or as const for integer discriminators. A non-abstract base, or any
base whose UnknownDerivedTypeHandling falls back to the base contract, adds an alternative without the discriminator,
and a nullable member adds {"type":"null"}. Derived types registered without a discriminator are not yet published
with overlap-tolerant anyOf semantics. A derived type that reaches the
base again, such as a block with child blocks, is cut there to {"type":"object"} (with "null" added to type
when the member is nullable) and reported as EM9014. A derived type reached again while it is still being expanded
is cut to an open object that keeps only its required discriminator.
Input schemas do not expand polymorphic types yet.
Sensitivity declarations
When the effective ContractCapability attribute explicitly supplies SensitiveInput, SensitiveOutput, or a
non-Unspecified OutputSensitivity, the generated capability metadata includes sensitiveInputDeclared or
sensitiveOutputDeclared, respectively, with the string value true. The corresponding safety property carries the
effective boolean value. Absence of the metadata key means that the declaration is unknown; historical manifests also
lack these keys. The keys report source declarations, not an audit or authorization decision.
ContractCapabilityAttribute.OutputSensitivity provides explicit output sensitivity classification via
ContractOutputSensitivity (Unspecified, Public, Secret, ProtectedData):
- When
OutputSensitivityisSecretorProtectedData, the generator emitssafety.outputSensitivity("Secret"or"ProtectedData"), sets effectivesafety.sensitiveOutputtotrue, and recordsmetadata["sensitiveOutputDeclared"] = "true". - When
OutputSensitivityisPublic, the generator emitssafety.outputSensitivity("Public"), sets effectivesafety.sensitiveOutputtofalse, and recordsmetadata["sensitiveOutputDeclared"] = "true". - When
OutputSensitivityis omitted orUnspecified, legacySensitiveOutputbehavior is preserved unchanged andsafety.outputSensitivityis omitted from the emitted JSON. - Combining contradictory declarations on the same attribute (
OutputSensitivity = PublicwithSensitiveOutput = true,OutputSensitivity = SecretorProtectedDatawithSensitiveOutput = false, or an undefined enum value) fails closed with compile-time errorEM9024. ContractCapabilityAttribute.SafeConsumerOperationsoptionally lists safe consumer operations or plugin alternatives (for exampleEternet.DevOps.Infrastructure.Contracts/DeliverServiceUserApiKeyToSecretBindingorplugin:api-key.create-secret-binding). Entries are trimmed, deduplicated, and ordinally sorted intosafety.safeConsumerOperations(omitted when empty).- When a published HTTP or OData capability exposes a readable, serializable string-like response property whose name
(or
[JsonPropertyName]) indicates secret material (such as*Secret,*Token,*ApiKey,*Password,*PrivateKey,*AccessKey,*ConnectionString, excluding pagination/concurrency cursors and non-secret metadata such as*Id,*Count,*Status,*Hash,*Sha256,*Prefix,*ExpiresAt,Masked*) without effective sensitive output classification (OutputSensitivityset toSecret/ProtectedDataorSensitiveOutput = true), the generator reports compile-time warningEM9025.
The capability fingerprint includes each declared sensitivity value, any non-Unspecified OutputSensitivity, and any
non-empty SafeConsumerOperations so declarations, classification changes, or guidance updates invalidate the previous
fingerprint. Existing manifests and fingerprints remain unchanged when these fields are not declared.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
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 |
|---|---|---|
| 3.10.0 | 198 | 12/3/2026 |
| 3.9.0 | 375 | 11/30/2026 |
| 3.8.0 | 427 | 11/30/2026 |
| 3.7.0 | 244 | 11/29/2026 |
| 3.6.0 | 212 | 11/28/2026 |
| 3.5.0 | 245 | 11/27/2026 |
| 3.4.0 | 107 | 11/27/2026 |
| 3.3.0 | 106 | 11/26/2026 |
| 3.2.0 | 361 | 11/19/2026 |
| 3.1.0 | 325 | 11/7/2026 |
| 3.0.0 | 112 | 11/6/2026 |
| 2.8.0 | 300 | 11/2/2026 |
| 2.7.0 | 721 | 10/30/2026 |
| 2.6.0 | 717 | 10/30/2026 |
| 2.5.0 | 3,900 | 10/30/2026 |
| 2.4.1 | 203 | 10/29/2026 |
| 2.3.0 | 1,893 | 10/23/2026 |
| 2.2.0 | 234 | 10/23/2026 |
| 2.1.0 | 228 | 10/21/2026 |
| 2.0.0 | 592 | 10/15/2026 |