OpenAPITools / OpenAPITools/openapi-generator

[REQ] Switch Gradle plugin to use the File Provider API for Inputs/Outputs

Open
#12,303 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Right now the Gradle plugin relies on all of it's Input and Output properties as Strings, even those that are representing file paths.

While users can convert from properties of Files -> String and Strings -> Files it can be very cumbersome, and doesn't lend itself well with connecting the inputs/outputs of the Generate task with other tasks.

This feature request is to change the GenerateTask.kt file to use the following properties instead of Property<String> for file based input/outputs.

RegularFileProperty
DirectoryProperty

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

Start with modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt and inventory the file-based input and output properties currently represented as Property. Read how the Generate task connects those properties to other Gradle tasks, then confirm that the relevant paths use RegularFileProperty or DirectoryProperty and remain connectable as task inputs and outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.