Skip to content

no-case-mismatch

Full name
@azure-tools/typespec-azure-core/no-case-mismatch

Validate that no two types have the same name with different casing. Having types that differ only by casing can cause issues in case-insensitive languages and is generally confusing. This applies to models, enums, and unions.

Two models that differ only by casing:

model FailOverProperties {
priority: int32;
}
model FailoverProperties {
priority: int32;
}

Multiple types with case variations:

model FailOverProperties {}
model FailoverProperties {}
model Failoverproperties {}

Types with meaningfully different names:

model FailedOver {
status: string;
}
model FailOver {
priority: int32;
}