Duplicated enum entries in the smithy model
ghostbuster91 opened this issue · 1 comments
ghostbuster91 commented
It seems that it is possible to have duplicated enum key-pair entries in the smithy model.
Following snippet passes the validation:
intEnum FaceCard {
JACK = 1
JACK = 1
}
The documentation does not say anything about this, there is only a constraint for values to be unique:
Enums do not support aliasing; all values MUST be unique.
I think that is fine, as during the model assembly these two will be flatten into a single entry, but wanted to double check if this is indeed an intended behavior.
Maybe a ValidationEvent(severity: NOTE)
should be emitted?
mtdowling commented
This is a bug. We should fail during the parsing phase.