@@ -8,68 +8,74 @@ import io.polyapi.client.api.model.PolyEntity;
88import io.polyapi.client.api.AuthTokenOptions;
99import io.polyapi.commons.api.model.PolyGeneratedClass;
1010{{ ~#each this.imports }}
11+ {{ ~#unless (eq (lastSegment this ) ../className )}}
1112import {{{ this }}} ;
13+ {{ ~/unless }}
1214{{ ~/each }}
1315
1416@PolyGeneratedClass
1517public class {{ className }} extends PolyContext {
1618{{ ~#each functionSpecifications }}
17- private final {{ this. className }} {{ this.name }} ;
19+ private final {{ typeRef ( classFqn this ) ../ className}} {{ this.name }} ;
1820{{ ~/each }}
1921{{ ~#each standardAuthFunctionSpecifications }}
20- private final {{ this. className }} {{ this.name }} ;
22+ private final {{ typeRef ( classFqn this ) ../ className}} {{ this.name }} ;
2123{{ ~/each }}
2224{{ ~#each subresourceAuthFunctionSpecifications }}
23- private final {{ this. className }} {{ this.name }} ;
25+ private final {{ typeRef ( classFqn this ) ../ className}} {{ this.name }} ;
2426{{ ~/each }}
2527{{ ~#each serverVariableSpecifications }}
26- public final {{ this. className }} {{ this.name }} ;
28+ private final {{ typeRef ( classFqn this ) ../ className}} {{ this.name }} ;
2729{{ ~/each }}
2830{{ ~#each webhookHandlerSpecifications }}
29- private final {{ this. className }} {{ this.name }} ;
31+ private final {{ typeRef ( classFqn this ) ../ className}} {{ this.name }} ;
3032{{ ~/each }}
3133{{ #each subcontexts }}
32- public final {{ this. className }} {{ this.name }} ;
34+ private final {{ typeRef ( classFqn this ) ../ className}} {{ this.name }} ;
3335{{ ~/each }}
3436
35- public {{ className }} (PolyProxyFactory proxyFactory, WebSocketClient webSocketClient) {
36- super(proxyFactory, webSocketClient);
37+ public {{ className }} (PolyProxyFactory proxyFactory, WebSocketClient webSocketClient) {
38+ super(proxyFactory, webSocketClient);
3739{{ ~#each serverFunctionSpecifications }}
38- this.{{ this.name }} = createServerFunctionProxy({{ this.className }} .class);
40+ this.{{ this.name }} =
41+ createServerFunctionProxy({{ classFqn this }} .class);
3942{{ ~/each }}
4043{{ ~#each customFunctionSpecifications }}
41- this.{{ this.name }} = createCustomFunctionProxy({{ this.className }} .class);
44+ this.{{ this.name }} =
45+ createCustomFunctionProxy({{ classFqn this }} .class);
4246{{ ~/each }}
4347{{ ~#each apiFunctionSpecifications }}
44- this.{{ this.name }} = createApiFunctionProxy({{ this.className }} .class);
48+ this.{{ this.name }} =
49+ createApiFunctionProxy({{ classFqn this }} .class);
4550{{ ~/each }}
4651{{ ~#each subresourceAuthFunctionSpecifications }}
47- this.{{ this.name }} = createSubresourceAuthFunction({{ this.className }} .class);
52+ this.{{ this.name }} =
53+ createSubresourceAuthFunction({{ classFqn this }} .class);
4854{{ ~/each }}
4955{{ ~#each standardAuthFunctionSpecifications }}
50- this.{{ this.name }} = create{{ #if audienceRequired }} Audience{{ /if }} TokenAuthFunction({{ this.className }} .class);
56+ this.{{ this.name }} =
57+ create{{ #if audienceRequired }} Audience{{ /if }} TokenAuthFunction({{ classFqn this }} .class);
5158{{ ~/each }}
5259{{ ~#each serverVariableSpecifications }}
53- this.{{ this.name }} = createServerVariableHandler({{ this.className }} .class);
60+ this.{{ this.name }} =
61+ createServerVariableHandler({{ classFqn this }} .class);
5462{{ ~/each }}
5563{{ ~#each webhookHandlerSpecifications }}
56- this.{{ this.name }} = createPolyTriggerProxy({{ this.className }} .class);
64+ this.{{ this.name }} =
65+ createPolyTriggerProxy({{ classFqn this }} .class);
5766{{ ~/each }}
5867{{ #each subcontexts }}
59- this.{{ this.name }} = new {{ this. className }} (proxyFactory, webSocketClient);
68+ this.{{ this.name }} = new {{ typeRef ( classFqn this ) ../ className}} (proxyFactory, webSocketClient);
6069{{ ~/each }}
6170 }
6271
6372{{ ~#each functionSpecifications }}
6473 public {{{ this.returnType }}} {{{ this.methodSignature }}} {
65- {{ ~#if this.returnsValue }}
66- return
67- {{ ~else }}
68- {{ ~/if }} this.{{ this.name }} .{{ this.name }} ({{ this.paramVariableNames }} );
74+ {{ #if this.returnsValue }} return {{ /if }} this.{{ this.name }} .{{ this.name }} ({{ this.paramVariableNames }} );
6975 }
7076
71- public {{{ this. className }}} get{{{ this.className } }} Function() {
72- return this.{{{ this.name } }} ;
77+ public {{ typeRef ( classFqn this ) ../ className}} get{{ this.className }} Function() {
78+ return this.{{ this.name }} ;
7379 }
7480{{ ~/each }}
7581
@@ -110,6 +116,9 @@ public class {{className}} extends PolyContext {
110116{{ ~#each specifications }}
111117
112118 {{ ~#ifIsType this " AuthFunctionSpecification" }}
119+ public {{ typeRef (classFqn this ) ../className }} get{{ this.className }} AuthFunction() {
120+ return this.{{ this.name }} ;
121+ }
113122 {{ ~#if subResource }}
114123 public void {{ name }} (String token) {
115124 this.{{ name }} .{{ name }} (token);
@@ -127,8 +136,8 @@ public class {{className}} extends PolyContext {
127136 }
128137 {{ ~/if }}
129138
130- public {{{ this. className }}} get{{{ this.className } }} AuthFunction() {
131- return this.{{{ this.name } }} ;
139+ public {{ typeRef ( classFqn this ) ../ className}} get{{ this.className }} AuthFunction() {
140+ return this.{{ this.name }} ;
132141 }
133142 {{ ~/ifIsType }}
134143{{ ~/each }}
0 commit comments