File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
restdocs-openapi-gradle-plugin/src/main/kotlin/com/epages/restdocs/openapi/gradle Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ internal object OpenApi20Generator {
130130 private fun groupByPath (resources : List <ResourceModel >): Map <String , List <ResourceModel >> {
131131 return resources.sortedWith(
132132 // by first path segment, then path length, then path
133- comparing<ResourceModel , String > { it.request.path.split(" /" ).firstOrNull() .orEmpty() }
133+ comparing<ResourceModel , String > { it.request.path.split(" /" ).firstOrNull { s -> s.isNotEmpty() } .orEmpty() }
134134 .thenComparing(comparingInt<ResourceModel > { it.request.path.count { c -> c == ' /' } })
135135 .thenComparing(comparing<ResourceModel , String > { it.request.path }))
136136 .groupBy { it.request.path }
You can’t perform that action at this time.
0 commit comments