OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.98k stars 6.6k forks source link

[BUG] Gradle 7, Kotlin build script - mutable type with setter #9778

Open SarangKanabargi opened 3 years ago

SarangKanabargi commented 3 years ago

Bug Report Checklist

Description

Gradle open api generator plugin using Kotlin build script is broken with the gradle 7 upgrade. Gradle 7 has new validation rules on mutable type with setters and this breaks existing kotlin build scripts

openapi-generator version

5.1.0

OpenAPI declaration file content or url

petstore.yaml

Generation Details
Steps to reproduce

Run openApiValidate task

Related issues/PRs
Suggest a fix

https://docs.gradle.org/7.0.2/userguide/validation_problems.html#mutable_type_with_setter

Deepu978 commented 3 years ago

any update on this ?

Deepu978 commented 3 years ago

@wing328 can you help understand if this is fixed or being worked on as part of another issue

wing328 commented 3 years ago

We released v5.2.0 last week. Can you please give it a try to see if you're still experiencing the same issue?

SarangKanabargi commented 3 years ago

openApiGenerate tasks works fine with version 5.1.1 and 5.2.0 on Gradle 7+ openApiValidate still has the same problem with version 5.1.1 and 5.2.0 on Gradle 7+

Below is the error for openApiValidate

FAILURE: Build failed with an exception.

BUILD FAILED in 231ms 7:15:21 AM: Task execution finished 'openApiValidate'.

Ranbato commented 3 years ago

I don't get the error with 5.2.1 release and gradle 7.0.2. I was getting it previously with 5.1.1