Skip to content

Commit

Permalink
Add comments to operation methods (#641)
Browse files Browse the repository at this point in the history
* Add comments to operation methods

* Adjust templates
  • Loading branch information
mcruzdev authored Jan 29, 2024
1 parent 94bb20b commit 0dd27cd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 0dd27cd

Please sign in to comment.