public ModelAssembler addValidator(Validator validator) {
        validators.add(Objects.requireNonNull(validator));
        return this;
    }
Registers a validator to be used when validating the model.

@param validator Validator to register.
@return Returns the assembler.
smithy-model/src/main/java/software/amazon/smithy/model/loader/ModelAssembler.java