Has anyone already managed to integrate springdoc/...
# questions
t
Has anyone already managed to integrate springdoc/openapi/swagger into a grails 5.x project? Personally it's almost working but I still have problems with controller methods having parameters (whether in Path , Query, or Body). Here a small controller :
Copy code
@Tag(name = "Welcome", description = "Description of the endpoint")
@RestController
class SimpleController {

    @Operation(summary = "Get all data")
    @ApiResponse(responseCode = "200",
                 description = "Get all data",
                content = [@Content(schema = @Schema(implementation = Dummy.class))])
    @GetMapping("/index")
    def index() {
    	//Some stuff
    }

    @Operation(summary = "Get one record")
    @GetMapping("/withparams/{pv}")
    def withparams(@PathVariable("pv") String pv) {
    	//Some stuff
    }
}
BTW in Application.groovy
Copy code
@OpenAPIDefinition(
        info = @Info(
                title = "App Name",
                version = "0.1"
        )
)
The application does not start due to the following error:
Copy code
Caused by: java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'bms.ws.SimpleController' method
bms.ws.SimpleController#withparams(String)
to {GET [/withparams/{pv}]}: There is already 'bms.ws.SimpleController' bean method
bms.ws.SimpleController#withparams() mapped.
Do you have any idea why?