Skip to content

Commit 0dd27cd

Browse files
authored
Add comments to operation methods (#641)
* Add comments to operation methods * Adjust templates
1 parent 94bb20b commit 0dd27cd

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/template/QuteTemplatingEngineAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ public class QuteTemplatingEngineAdapter extends AbstractTemplatingEngineAdapter
3030
"auth/compositeAuthenticationProvider.qute",
3131
"auth/headersFactory.qute",
3232
"multipartFormdataPojo.qute",
33-
"pojoAdditionalProperties.qute"
33+
"pojoAdditionalProperties.qute",
34+
"operationJavaDoc.qute"
3435
};
3536
public final Engine engine;
3637

deployment/src/main/resources/templates/libraries/microprofile/api.qute

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,9 @@ public interface {classname} {
4545

4646
{#for op in operations.operation}
4747
{#if !op.isDeprecated || openapi:genDeprecatedApiAttr(package, classname, classes-codegen)}
48-
{#if op.summary}
49-
/**
50-
* {op.summary}
51-
*
52-
{#if op.notes}
53-
* {op.notes}
54-
*
55-
{/if}
48+
/**
49+
{#include operationJavaDoc.qute op=op/}
5650
*/
57-
{/if}
5851
@{op.httpMethod}
5952
{#if op.subresourceOperation}
6053
@Path("{op.path}")
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{#if op.summary}
2+
* {op.summary}
3+
*
4+
{/if}
5+
{#if op.notes}
6+
* {op.notes}
7+
*
8+
{/if}
9+
{#for p in op.pathParams}
10+
* @param {p.paramName} {p.description}
11+
{/for}
12+
{#for p in op.queryParams}
13+
* @param {p.paramName} {p.description}
14+
{/for}
15+
{#for p in op.bodyParams}
16+
* @param {p.paramName} {p.description}
17+
{/for}
18+
{#for p in op.headerParams}
19+
* @param {p.paramName} {p.description}
20+
{/for}

0 commit comments

Comments
 (0)