Skip to content

Kotlin gradle integration #19

Closed
Closed
@mdibaiee

Description

@mdibaiee

Hello!

While trying to integrate your project (it's wonderful by the way! great job!), we realised that it's not easy to integrate it with a Kotlin gradle DSL.

In order to add a processor, I had to do this:

openapiProcessor {
    apiPath("$projectDir/src/main/resources/openapi.yaml")

    val p = com.github.hauner.openapi.gradle.Processor("spring")
    p.processor("io.openapiprocessor:openapi-processor-spring:2021.3")
    p.targetDir("$projectDir/build/openapi")
    p.other.put("mapping", "$projectDir/src/main/resources/openapi-mapping.yaml")

    processors.put("spring", p)
}

Apparently the methodMissing method that you have does not work properly in Kotlin DSL, and using a spring { processor } does not work unfortunately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions