
LeanDocumentAttribute
- Namespace
- Rowles.LeanCorpus.Mapping.Attributes
- Assembly
- Rowles.LeanCorpus.dll
Marks a class or struct as a LeanCorpus document model. The source generator
emits a paired {TypeName}Index static class with field descriptors,
ToDocument, FromStoredDocument, and CreateSchema members.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
public sealed class LeanDocumentAttribute : Attribute
- Inheritance
-
LeanDocumentAttribute
Name
Overrides the logical document name used in diagnostics. Defaults to the type name.
StrictSchema
Whether the generated schema is strict, rejecting fields it does not know about.