Skip to content

Conversation

@joewyz
Copy link
Contributor

@joewyz joewyz commented Jan 22, 2026

The current codegen for @httpApiKeyAuthTrait in client side missed a ) at the end of the assignment of in field and the enum Location in HttpApiKeyAuthTrait.java does not have a public from() method, which makes the generated HttpApiKeyAuthTrait invalid.
For the following trait:

@httpApiKeyAuth(name: "X-API-Key", in: "header")

The original generated code would be:

private static final HttpApiKeyAuthTrait httpApiKeyAuthScheme = HttpApiKeyAuthTrait.builder()
            .name("X-API-Key")
            .in(HttpApiKeyAuthTrait.Location.from("header")
            .build();

Generated code after fix:

private static final HttpApiKeyAuthTrait httpApiKeyAuthScheme = HttpApiKeyAuthTrait.builder()
            .name("X-Api-Key")
            .in(HttpApiKeyAuthTrait.Location.HEADER)
            .build();

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant