@Override
    public void before(Context<? extends Trait> context, OpenApi.Builder builder) {
        Map<ShapeId, List<ShapeId>> violations = new LinkedHashMap<>();
        for (Shape shape : context.getModel().toSet()) {
            List<ShapeId> unsupportedTraits = new ArrayList<>(TRAITS.size());
            for (ShapeId trait : TRAITS) {
                if (shape.hasTrait(trait)) {
                    unsupportedTraits.add(trait);
                }
            }
            if (!unsupportedTraits.isEmpty()) {
                violations.put(shape.getId(), unsupportedTraits);
            }
        }

        if (violations.isEmpty()) {
            return;
        }

        StringBuilder message = new StringBuilder(
                "Encountered unsupported Smithy traits when converting to OpenAPI:");
        for (Map.Entry<ShapeId, List<ShapeId>> entry : violations.entrySet()) {
            message.append(String.format(
                    " (`%s`: [`%s`])",
                    entry.getKey(),
                    entry.getValue()
                            .stream()
                            .map(ShapeId::toString)
                            .collect(Collectors.joining("`, `"))));
        }
        message.append(". While these traits may still be meaningful to clients and servers using the Smithy "
                + "model directly, they have no direct corollary in OpenAPI and can not be included in "
                + "the generated model.");

        if (context.getConfig().getIgnoreUnsupportedTraits()) {
            LOGGER.warning(message.toString());
        } else {
            throw new OpenApiException(message.toString());
        }
    }
Logs each instance of traits and features that are known to not
work in OpenAPI.
smithy-openapi/src/main/java/software/amazon/smithy/openapi/fromsmithy/mappers/UnsupportedTraits.java