documentation-required
@azure-tools/typespec-azure-core/documentation-requiredRequire documentation over enums, models, and operations.
Enums, models, operations, and their members/properties should have documentation. Use doc comments (/** */) to provide descriptions.
Impact
Section titled “Impact”- Area: API, SDK
Missing documentation produces poor SDK reference docs and API documentation.
LintDiff Equivalent
Section titled “LintDiff Equivalent”This rule corresponds to the LintDiff rule SummaryOrDescription.
❌ Incorrect
Section titled “❌ Incorrect”Model without documentation:
model Pet { name: string;}Operation without documentation:
op read(): void;Enum without documentation:
enum PetKind { Cat, Dog,}✅ Correct
Section titled “✅ Correct”/** A pet in the system. */model Pet { /** The name of the pet. */ name: string;}
/** Reads a pet resource. */op read(): Pet;
/** The kind of pet. */enum PetKind { /** A cat. */ Cat,
/** A dog. */ Dog,}Suppression
Section titled “Suppression”Do not suppress. Add a /** */ doc comment or an @doc decorator.