File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
http-generator-client/src
main/java/io/avaje/http/generator/client
test/java/io/avaje/http/generator/client/clients Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import static java .util .stream .Collectors .toMap ;
11
11
12
+ import java .util .HashSet ;
12
13
import java .util .List ;
13
14
import java .util .Map ;
14
15
import java .util .Optional ;
@@ -35,6 +36,7 @@ class ClientMethodWriter {
35
36
private final Optional <RequestTimeoutPrism > timeout ;
36
37
private final boolean useConfig ;
37
38
private final Map <String , String > segmentPropertyMap ;
39
+ private final Set <String > propertyConstants = new HashSet <>();
38
40
39
41
ClientMethodWriter (MethodReader method , Append writer , boolean useJsonb ) {
40
42
this .method = method ;
@@ -76,6 +78,11 @@ private void methodStart(Append writer) {
76
78
77
79
segmentPropertyMap .forEach (
78
80
(k , v ) -> {
81
+
82
+ if (!propertyConstants .add (v )) {
83
+ return ;
84
+ }
85
+
79
86
writer .append (" private static final String %s = " , v );
80
87
final String getProperty = useConfig ? "Config.get(" : "System.getProperty(" ;
81
88
writer .append (getProperty ).append ("\" %s\" );" , k ).eol ();
Original file line number Diff line number Diff line change 7
7
public interface TitanFall {
8
8
9
9
@ Get ("/${titan}/${drop.point}" )
10
- Titan titanfall ();
10
+ Titan titanFall ();
11
+
12
+
13
+ @ Get ("/${titan}/copium" )
14
+ Titan titanFall3 ();
11
15
}
You can’t perform that action at this time.
0 commit comments