Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #7325
Closed
Open
Issue created Sep 01, 2020 by Administrator@rootContributor

[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`
Assignee
Assign to
Time tracking