In 0.28.0, common-suffix enum promotion collapses schema enums that share a name suffix but have different value sets into a single promoted enum, and emits aliases that point at the wrong values.
Observed in generated api-enums.ts (valuation_v3 spec):
/** Enum values from common suffix (promoted) */
export const ExternalAssessmentStatus = {
NEEDS_REVIEW: 'needs_review' as const,
} as const
// Type aliases for duplicate enum values
export const ExpertAssessmentUpdateArgsExternalAssessmentStatus = ExternalAssessmentStatus
export const HotlinerAssessmentUpdateArgsExternalAssessmentStatus = ExternalAssessmentStatus
export const UpdateValidateExternalReferenceStatus = ExternalAssessmentStatus
But per the spec (and the correctly generated Types.updateValidateExternalReference.Enums.Status), those three accept 'accepted' | 'refused', not 'needs_review'. The promoted aliases are therefore wrongly typed and cannot even represent valid request values.
Expected: suffix-promotion must only alias enums whose value sets are identical; otherwise emit distinct per-schema enums (no promotion).
The direction-typed Types.<op>.Enums.* output is correct; only the promoted top-level aliases are affected.
In 0.28.0, common-suffix enum promotion collapses schema enums that share a name suffix but have different value sets into a single promoted enum, and emits aliases that point at the wrong values.
Observed in generated
api-enums.ts(valuation_v3 spec):But per the spec (and the correctly generated
Types.updateValidateExternalReference.Enums.Status), those three accept'accepted' | 'refused', not'needs_review'. The promoted aliases are therefore wrongly typed and cannot even represent valid request values.Expected: suffix-promotion must only alias enums whose value sets are identical; otherwise emit distinct per-schema enums (no promotion).
The direction-typed
Types.<op>.Enums.*output is correct; only the promoted top-level aliases are affected.