From fc2ffa198d26b322eed28eec12daa89e237e13d2 Mon Sep 17 00:00:00 2001 From: Koos Gadellaa Date: Tue, 27 Jan 2026 21:56:10 +0100 Subject: [PATCH] Update api.mustache remove nonnullable annotations in Method fetch The current code created: ` Method method = this.getClass().getMethod("someMethodWithHttpInfo", @jakarta.annotation.Nonnull String.class, @jakarta.annotation.Nonnull String.class); ` Which is invalid code. Removed the nonnull addition --- .../src/main/resources/Java/libraries/okhttp-gson/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index 9519ce13c75e..f7f59302a431 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -263,7 +263,7 @@ public class {{classname}} { ExecutableValidator executableValidator = factory.getValidator().forExecutables(); Object[] parameterValues = { {{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}} }; - Method method = this.getClass().getMethod("{{operationId}}WithHttpInfo"{{#allParams}}, {{#isArray}}java.util.List{{/isArray}}{{#isMap}}java.util.Map{{/isMap}}{{^isArray}}{{^isMap}}{{>nullable_var_annotations}} {{{dataType}}}{{/isMap}}{{/isArray}}.class{{/allParams}}); + Method method = this.getClass().getMethod("{{operationId}}WithHttpInfo"{{#allParams}}, {{#isArray}}java.util.List{{/isArray}}{{#isMap}}java.util.Map{{/isMap}}{{^isArray}}{{^isMap}} {{{dataType}}}{{/isMap}}{{/isArray}}.class{{/allParams}}); Set> violations = executableValidator.validateParameters(this, method, parameterValues);