@Override
    public void write(DocWriter writer, String previousText, ShapeDetailsSection section) {
        writer.writeWithNoFormatting(previousText);
        writer.openAdmonition(NoticeType.IMPORTANT);

        var index = ServiceIndex.of(section.context().model());
        var service = section.context().settings().service();
        var operation = section.shape();

        var serviceAuth = DocgenUtils.getPrioritizedServiceAuth(section.context().model(), service);
        var operationAuth = List.copyOf(
                index.getEffectiveAuthSchemes(service, operation, AuthSchemeMode.MODELED).keySet());

        if (serviceAuth.equals(operationAuth)) {
            // If the total service auth and effective *modeled* operation auth are the same,
            // that means that the operation just has optional auth since isIntercepted would
            // return false otherwise. It would have been overly confusing to include this
            // case in the big text block below.
            writer.write("""
                    This operation may be optionally called without authentication.
                    """);
            writer.closeAdmonition();
            return;
        }

        var operationSchemes = operationAuth.stream()
                .map(id -> section.context().symbolProvider().toSymbol(section.context().model().expectShape(id)))
                .toList();

        writer.putContext("optional", supportsNoAuth(index, service, section.shape()));
        writer.putContext("schemes", operationSchemes);
        writer.putContext("multipleSchemes", operationSchemes.size() > 1);

        writer.write("""
                ${?schemes}This operation ${?optional}may optionally${/optional}${^optional}MUST${/optional} \
                be called with ${?multipleSchemes}one of the following priority-ordered auth schemes${/multipleSchemes}\
                ${^multipleSchemes}the following auth scheme${/multipleSchemes}: \
                ${#schemes}${value:R}${^key.last}, ${/key.last}${/schemes}.${/schemes}\
                ${^schemes}${?optional}This operation must be called without authentication.${/optional}${/schemes}
                """);
        writer.closeAdmonition();
    }
Adds a priority list of supported auth schemes for operations with optional auth or
operations which don't support all of a service's auth schemes.
smithy-docgen/src/main/java/software/amazon/smithy/docgen/interceptors/OperationAuthInterceptor.java