OpenAPITools / OpenAPITools/openapi-generator

OpenApi Generator gradle plugin generates new gradle project

Open
#9,602 7 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

Hello!

I'm trying to generate code via OpenAPI Generator Gradle Plugin version 5.1.1
I can't understand behavior of this plugin, it generates new gradle project, but not only kotlin classes

my task configuration is

openApiGenerate {
    //verbose.set(true)
    generatorName.set("kotlin")
    outputDir.set(project.file("${buildDir.name}/generated").absolutePath)
    inputSpec.set(project.file("schema/openapi.json").absolutePath)
    packageName.set("org.camunda.bpm.engine.rest")
    apiPackage.set("org.camunda.bpm.engine.rest.api")
    modelPackage.set("org.camunda.bpm.engine.rest.model")
}

As far as i know, maven plugin generates just classes, not new project
Looks like gradle plugins works as generator cli

Why openapi generator gradle plugin generates new project?
photo_2021-05-27_12-14-42

openapi-generator version

5.1.1

OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names the Gradle plugin's openApiGenerate configuration, generatorName, outputDir, and inputSpec, but no source files, test, or reproducible specification. Start by reproducing the shown configuration with version 5.1.1 and inspect the plugin's handling of outputDir and project files. Done means determining whether the generated Gradle project is expected, then documenting or correcting that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.