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 99
1010import static java .util .stream .Collectors .toMap ;
1111
12+ import java .util .HashSet ;
1213import java .util .List ;
1314import java .util .Map ;
1415import java .util .Optional ;
@@ -35,6 +36,7 @@ class ClientMethodWriter {
3536 private final Optional <RequestTimeoutPrism > timeout ;
3637 private final boolean useConfig ;
3738 private final Map <String , String > segmentPropertyMap ;
39+ private final Set <String > propertyConstants = new HashSet <>();
3840
3941 ClientMethodWriter (MethodReader method , Append writer , boolean useJsonb ) {
4042 this .method = method ;
@@ -76,6 +78,11 @@ private void methodStart(Append writer) {
7678
7779 segmentPropertyMap .forEach (
7880 (k , v ) -> {
81+
82+ if (!propertyConstants .add (v )) {
83+ return ;
84+ }
85+
7986 writer .append (" private static final String %s = " , v );
8087 final String getProperty = useConfig ? "Config.get(" : "System.getProperty(" ;
8188 writer .append (getProperty ).append ("\" %s\" );" , k ).eol ();
Original file line number Diff line number Diff line change 77public interface TitanFall {
88
99 @ Get ("/${titan}/${drop.point}" )
10- Titan titanfall ();
10+ Titan titanFall ();
11+
12+
13+ @ Get ("/${titan}/copium" )
14+ Titan titanFall3 ();
1115}
You can’t perform that action at this time.
0 commit comments