Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][GRADLE] Gradle plugin does not properly support inputSpecRootDirectory #16419

Closed
6 tasks done
Luckl opened this issue Aug 27, 2023 · 0 comments · Fixed by #16420 or zuhlke/engineering-posts#62
Closed
6 tasks done

Comments

@Luckl
Copy link
Contributor

Luckl commented Aug 27, 2023

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

See #15483. The PR fixing this issue marks the configuration option with @InputFile which does not work for a directory. This causes the following exception to be thrown:

A problem was found with the configuration of task ':openApiGenerate' (type 'GenerateTask').
  - In plugin 'org.openapi.generator' type 'org.openapitools.generator.gradle.plugin.tasks.GenerateTask' property 'inputSpecRootDirectory' file 'C:\xx\xx\xx\contracts' is not a file.
openapi-generator version

7.0.0 and 6.6.0, haven't tried other versions.

OpenAPI declaration file content or url

N/A

Generation Details
Steps to reproduce

Use the plugin to generate two yamls that are in a directory.

see https://github.com/Luckl/openapi-gradle-with-root-directory

Related issues/PRs

#15483

Suggest a fix

Change @get:InputFile to @get:InputDirectory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant