smithy-lang/smithy

Validations with `ERROR` severity are suppressible when documented as insuppressible

Closed this issue · 1 comments

The documentation states that validations with a severity level of ERROR are unable to be suppressed: docs/source-2.0/spec/model-validation.rst#severity.

However in version 1.36.0 with PR #1890 the call to Severity.canSuppress() was removed: d8ee25e#diff-5088b9a4c34e5de8b7a61ddd131c7279111079cfd92d464b02f97bb794f738a5L328-L331.

It would be great if we could get this new behaviour documented and Severity.canSuppress fully removed if it's intentional, or if the old behaviour is to be reinstated have a validation or warning when an ERROR severity is attempted to be suppressed.

I personally lean towards keeping the current behaviour as I have a use-case for suppressing HttpUriConflict as my team and I are writing a specification for an existing API/server and are generating OpenAPI from Smithy which allows these apparent conflicts. But if this behaviour is to be reverted we do not want to rely on the current behaviour.

Oh that wasn't an intentional regression. We don't want to be able to suppress ERROR since those typically indicate that a model violates some kind of MUST from the spec that people are likely reasonably relying on in things like code generators or runtime libraries.