Skip to content

question: how to add ClientInterceptor at codegen stage #918

@Petroniuss

Description

@Petroniuss

I was looking into customizing generating code during codegen time - an example would be installing a custom ClientInterceptor for all generated clients at build time. My use-case is that I wouldn't want users of generated library to have to manually add Interceptors that do some generic things applicable to all generated clients.

I see that there's JavaCodegenIntegration interface that is meant to be used as an entry point for extensions during codegen time but I don't see any method that would allow to add an interceptor during codegen. Have I missed something?

For example, smithy-typescript has TypeScriptIntegration interface that contains a method called getClientPlugins:

default List<RuntimeClientPlugin> getClientPlugins() {
        return Collections.emptyList();
    }

Would it be possible to add something similar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions