@Override
    public List<ValidationEvent> validate(Model model) {
        Set<ServiceShape> serviceShapesWithTrait = model.getServiceShapesWithTrait(HttpApiKeyAuthTrait.class);
        List<ValidationEvent> events = new ArrayList<>();

        for (ServiceShape serviceShape : serviceShapesWithTrait) {
            HttpApiKeyAuthTrait trait = serviceShape.expectTrait(HttpApiKeyAuthTrait.class);
            trait.getScheme().ifPresent(scheme -> {
                if (trait.getIn() != HttpApiKeyAuthTrait.Location.HEADER) {
                    events.add(error(serviceShape,
                            trait,
                            String.format("The httpApiKeyAuth trait must have an `in` value of `header` when a `scheme`"
                                    + " is provided, found: %s", trait.getIn())));
                }
            });
        }

        return events;
    }
Validates that if an HttpApiKeyAuth trait's scheme field is present then
the 'in' field must specify "header". Scheme should only be used with the
"Authorization" http header.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/HttpApiKeyAuthTraitValidator.java