Skip to content

Commit 97835e8

Browse files
committed
fix: generated constructor properties in client is public
1 parent a45fd8b commit 97835e8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

code-generator/src/main/kotlin/io/timemates/rsproto/codegen/services/client/ClientServiceApiGenerator.kt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@ internal object ClientServiceApiGenerator {
1515
.addParameter("protobuf", Types.protoBuf)
1616
.build()
1717
)
18-
.addProperty(PropertySpec.builder("rsocket", Types.rsocket).initializer("rsocket").build())
19-
.addProperty(PropertySpec.builder("protobuf", Types.protoBuf).initializer("protobuf").build())
18+
.addProperty(
19+
PropertySpec.builder("rsocket", Types.rsocket)
20+
.addModifiers(KModifier.PRIVATE)
21+
.initializer("rsocket")
22+
.build()
23+
)
24+
.addProperty(
25+
PropertySpec.builder("protobuf", Types.protoBuf)
26+
.addModifiers(KModifier.PRIVATE)
27+
.initializer("protobuf").build()
28+
)
2029
.addFunctions(service.rpcs.map { mapRpc(it, service.name) })
2130
.build()
2231
}

0 commit comments

Comments
 (0)