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] GenerateTask' property 'input' annotated with @Internal should not be also annotated with @Input. #9835

Closed
2 of 6 tasks
liuzqt opened this issue Jun 24, 2021 · 2 comments

Comments

@liuzqt
Copy link

liuzqt commented Jun 24, 2021

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

I init a gradle project and follow the tutorial here https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin and try to generate server stub code.
run ./gradlew openApiGenerate got this error:

> Task :app:openApiGenerate FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:openApiGenerate' (type 'GenerateTask').
  - Type 'org.openapitools.generator.gradle.plugin.tasks.GenerateTask' property 'input' annotated with @Internal should not be also annotated with @Input.
    
    Reason: A property is ignored but also has input annotations.
    
    Possible solutions:
      1. Remove the input annotations.
      2. Remove the @Internal annotation.
    
    Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#ignored_property_must_not_be_annotated for more details about this problem.
openapi-generator version

5.1.1

OpenAPI declaration file content or url

The repo to reproduce this error : https://github.com/liuzqt/openapi-gradle

Generation Details

gradle version: 7.0.2

Steps to reproduce

clone repo https://github.com/liuzqt/openapi-gradle and run

./gradlew openApiGenerate
Related issues/PRs
Suggest a fix
@toby-murray-snow-software
Copy link
Contributor

toby-murray-snow-software commented Jun 29, 2021

Is this a duplicate of #9253? Comments there suggest it should be resolved in 5.1.1, so a bit suspicious.

@liuzqt
Copy link
Author

liuzqt commented Jun 29, 2021

@toby-murray-snow-software yeah the same issue, sorry I was mixing 5.1.1 and 5.1.0, after I upgrade all to 5.1.1 the issue was gone. Will mark this as resolved.

@liuzqt liuzqt closed this as completed Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants