diff --git a/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/template/QuteTemplatingEngineAdapter.java b/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/template/QuteTemplatingEngineAdapter.java index fb51cb94..0bea9b5d 100644 --- a/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/template/QuteTemplatingEngineAdapter.java +++ b/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/template/QuteTemplatingEngineAdapter.java @@ -30,7 +30,8 @@ public class QuteTemplatingEngineAdapter extends AbstractTemplatingEngineAdapter "auth/compositeAuthenticationProvider.qute", "auth/headersFactory.qute", "multipartFormdataPojo.qute", - "pojoAdditionalProperties.qute" + "pojoAdditionalProperties.qute", + "operationJavaDoc.qute" }; public final Engine engine; diff --git a/deployment/src/main/resources/templates/libraries/microprofile/api.qute b/deployment/src/main/resources/templates/libraries/microprofile/api.qute index 59585914..faa40b59 100644 --- a/deployment/src/main/resources/templates/libraries/microprofile/api.qute +++ b/deployment/src/main/resources/templates/libraries/microprofile/api.qute @@ -45,16 +45,9 @@ public interface {classname} { {#for op in operations.operation} {#if !op.isDeprecated || openapi:genDeprecatedApiAttr(package, classname, classes-codegen)} - {#if op.summary} - /** - * {op.summary} - * - {#if op.notes} - * {op.notes} - * - {/if} + /** + {#include operationJavaDoc.qute op=op/} */ - {/if} @{op.httpMethod} {#if op.subresourceOperation} @Path("{op.path}") diff --git a/deployment/src/main/resources/templates/libraries/microprofile/operationJavaDoc.qute b/deployment/src/main/resources/templates/libraries/microprofile/operationJavaDoc.qute new file mode 100644 index 00000000..db3caa21 --- /dev/null +++ b/deployment/src/main/resources/templates/libraries/microprofile/operationJavaDoc.qute @@ -0,0 +1,20 @@ + {#if op.summary} + * {op.summary} + * + {/if} + {#if op.notes} + * {op.notes} + * + {/if} + {#for p in op.pathParams} + * @param {p.paramName} {p.description} + {/for} + {#for p in op.queryParams} + * @param {p.paramName} {p.description} + {/for} + {#for p in op.bodyParams} + * @param {p.paramName} {p.description} + {/for} + {#for p in op.headerParams} + * @param {p.paramName} {p.description} + {/for}