Open
Description
Setup information
hikaku version: 3.3.0
specification converter: OpenAPI
implementation converter: Spring
build tool and version: Gradle 7.4.2
test framework: JUnit 5.8
Spring Boot 2.6.6, Spring WebMVC: 5.3.18
Describe the bug
I've copied the test from the README, but I get this error
👀 Expected, but unable to find:
<list of all endpoints>
I've stepped through the code and I can see that patternsCondition
returns null. In the Javadoc I see:
This is mutually exclusive with {@link #getPathPatternsCondition()}
such that when one returns {@code null} the other one returns an instance.
I can see pathPatternsCondition
seems to return the endpoint correctly.
Expected behavior
Hikaku can discover the endpoints defined in Spring
Code samples
The rest controllers are defined like this
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@RestController
@RequestMapping("/my-api")
class MyRestController {
@GetMapping(
value = ["/some/endpoint"],
produces = [APPLICATION_JSON_VALUE]
)
fun getDetails(
id: String
): ResponseEntity<ResponseModel> {
//...
}
}