Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit be59aad

Browse files
committed
cleanup
1 parent 2d46293 commit be59aad

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/main/kotlin/io/openapiprocessor/core/writer/java/MethodWriter.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ import io.openapiprocessor.core.writer.java.MappingAnnotationWriter as CoreMappi
1414
import io.openapiprocessor.core.writer.java.ParameterAnnotationWriter as CoreParameterAnnotationWriter
1515
import java.io.StringWriter
1616
import java.io.Writer
17+
import java.util.*
1718

1819
/**
1920
* Writer for Java interface methods, i.e. endpoints.
2021
*/
2122
open class MethodWriter(
22-
private val /*val*/ apiOptions: ApiOptions,
23-
private val /*val*/ mappingAnnotationWriter: CoreMappingAnnotationWriter,
24-
private var /*val*/ parameterAnnotationWriter: CoreParameterAnnotationWriter,
25-
private val /*val*/ beanValidationFactory: BeanValidationFactory,
23+
private val apiOptions: ApiOptions,
24+
private val mappingAnnotationWriter: CoreMappingAnnotationWriter,
25+
private var parameterAnnotationWriter: CoreParameterAnnotationWriter,
26+
private val beanValidationFactory: BeanValidationFactory,
2627
private val javadocWriter: JavaDocWriter = JavaDocWriter()
2728
) {
2829

@@ -75,7 +76,7 @@ open class MethodWriter(
7576
val camel = tokens.map { toCamelCase(it) }
7677
val head = camel.first()
7778
val tail = camel.subList(1, camel.count())
78-
.joinToString("") { it.capitalize() }
79+
.joinToString("") { it.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } }
7980

8081
return head + tail
8182
}

0 commit comments

Comments
 (0)