Table of Contents

Class ContentImportRequest

Namespace
Quilt4Net.Toolkit.Features.FeatureToggle
Assembly
Quilt4Net.Toolkit.dll

Re-assert the text of content keys — the supported way to change a key whose value the server already owns. Sent to POST Api/Content/import, which requires the content:write scope.

public sealed record ContentImportRequest : IEquatable<ContentImportRequest>
Inheritance
ContentImportRequest
Implements
Inherited Members

Remarks

Why this exists. A key's stored value wins over the default a caller supplies, which is correct — an administrator's edit must survive a redeploy. The gap it leaves is a value that exists and is now wrong in code: changing the literal does nothing, and the workarounds are minting Heading2 or hand-editing every environment. This is the path that follows from the rule rather than an exception to it (issue #161).

Set, not reset. Clearing a key so it re-seeds from code races a rolling deploy: an instance still on the old build re-materializes the old value, and old and new instances coexist by definition, so no ordering closes the window. An explicit write is authoritative the moment it lands.

Not for startup. Call this from a reviewed maintenance action or a CI step, not from application start. Every instance asserting its build's strings on boot recreates the original problem with extra steps, and a rollback then quietly reverts tenant content.

Properties

Environment

The caller's runtime environment name. It must resolve to the lowest stage, or the request is refused in full — no key in the set is written.

public required string Environment { get; init; }

Property Value

string

Items

The keys to write. Applied as one unit.

public required IReadOnlyList<ContentImportItem> Items { get; init; }

Property Value

IReadOnlyList<ContentImportItem>