[BUG] compile errors when generating kotlin-spring with delegate pattern and reactive true
Created by: mahartma
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.3.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/api/api.yml</inputSpec>
<generatorName>kotlin-spring</generatorName>
<apiPackage>com.reactive.playground.api</apiPackage>
<modelPackage>com.reactive.playground.api.model</modelPackage>
<configOptions>
<delegatePattern>true</delegatePattern>
<title>partner-service</title>
<reactive>true</reactive>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
Api:
suspend fun createPartner( @Valid @RequestBody partner: Partner
): ResponseEntity<Unit> {
return getDelegate().createPartner(partner, exchange);
}
Delegate: in the delegate the exchange param is missing
/**
* @see PartnerApi#createPartner
*/
fun createPartner(partner: Partner): ResponseEntity<Unit> {
return ResponseEntity(HttpStatus.NOT_IMPLEMENTED)
}
also there are no Flow imports in the delegate:
`import com.hdi.reactive.playground.api.model.InlineResponse400
import com.hdi.reactive.playground.api.model.Partner
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springframework.http.ResponseEntity
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.core.io.Resource
import org.springframework.web.server.ServerWebExchange
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
import java.util.Optional`