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

Commit 94a811a

Browse files
committed
fixed
1 parent 51118a0 commit 94a811a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private fun splitAtWordBreaks(src: String): List<String> {
145145
val trimmed = src.trimInvalidStart()
146146
trimmed.forEachIndexed { idx, c ->
147147

148-
if (idx == 0 || !src.isWordBreak(idx)) {
148+
if (idx == 0 || !trimmed.isWordBreak(idx)) {
149149
current.append(c)
150150
return@forEachIndexed
151151
}

src/test/groovy/io/openapiprocessor/core/writer/java/IdentifierSpec.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class IdentifierSpec extends Specification {
4848
"a-foo-bar" | "aFooBar" | "AFooBar" | "A_FOO_BAR"
4949
"a foo-bar" | "aFooBar" | "AFooBar" | "A_FOO_BAR"
5050
'api/some/thing' | 'apiSomeThing' | "ApiSomeThing" | "API_SOME_THING"
51+
"_fo-o" | 'foO' | 'FoO' | "FO_O"
5152

5253
// word break at underscore, it is valid but unwanted except for enums
5354
"_ab" | "ab" | "Ab" | "AB"

0 commit comments

Comments
 (0)